forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request diffblue#2344 from tautschnig/c++-vs-enum
Support Visual Studio's forward enum declarations
- Loading branch information
Showing
2 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
KNOWNBUG | ||
CORE | ||
main.cpp | ||
|
||
^EXIT=0$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,10 @@ Author: Daniel Kroening, [email protected] | |
#include "cpp_typecheck.h" | ||
|
||
#include <util/arith_tools.h> | ||
#include <util/c_types.h> | ||
#include <util/config.h> | ||
|
||
#include <ansi-c/c_qualifiers.h> | ||
#include <util/c_types.h> | ||
|
||
#include "cpp_enum_type.h" | ||
|
||
|
@@ -140,7 +141,9 @@ void cpp_typecheckt::typecheck_enum_type(typet &type) | |
throw 0; | ||
} | ||
} | ||
else if(has_body) | ||
else if( | ||
has_body || | ||
config.ansi_c.mode == configt::ansi_ct::flavourt::VISUAL_STUDIO) | ||
{ | ||
std::string pretty_name= | ||
cpp_scopes.current_scope().prefix+id2string(base_name); | ||
|
@@ -200,7 +203,8 @@ void cpp_typecheckt::typecheck_enum_type(typet &type) | |
if(new_symbol->type.get_bool(ID_C_class)) | ||
cpp_scopes.go_to(scope_identifier); | ||
|
||
typecheck_enum_body(*new_symbol); | ||
if(has_body) | ||
typecheck_enum_body(*new_symbol); | ||
} | ||
else | ||
{ | ||
|