diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-18 02:08:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-18 02:08:43 +0000 |
commit | 4ae493cccbfbf122ec6ebac0e330232c22fa8489 (patch) | |
tree | 36dc74511f2ad667433c33a96c1c16bb5a8699ec /include/clang | |
parent | 87152f783602f7548ffa28c56412d0a919cc0415 (diff) |
implement basic support for __label__. I wouldn't be shocked if there are
bugs from other clients that don't expect to see a LabelDecl in a DeclStmt,
but if so they should be easy to fix.
This implements most of PR3429 and rdar://8287027
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticParseKinds.td | 2 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index 8d4aa2868f..ad673f8198 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -62,6 +62,8 @@ def ext_gnu_indirect_goto : Extension< "use of GNU indirect-goto extension">, InGroup<GNU>; def ext_gnu_address_of_label : Extension< "use of GNU address-of-label extension">, InGroup<GNU>; +def ext_gnu_local_label : Extension< + "use of GNU locally declared label extension">, InGroup<GNU>; def ext_gnu_statement_expr : Extension< "use of GNU statement expression extension">, InGroup<GNU>; def ext_gnu_conditional_expr : Extension< diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 48f3e90ee1..8d8cf09912 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -1414,7 +1414,8 @@ public: QualType T1, QualType T2, UnresolvedSetImpl &Functions); - LabelDecl *LookupOrCreateLabel(IdentifierInfo *II, SourceLocation Loc); + LabelDecl *LookupOrCreateLabel(IdentifierInfo *II, SourceLocation Loc, + bool isLocalLabel = false); DeclContextLookupResult LookupConstructors(CXXRecordDecl *Class); CXXDestructorDecl *LookupDestructor(CXXRecordDecl *Class); |