Steve Naroff
f192fabbdc
Another tweak to handle the MS extensions (<rdar://problem/5956221>).
...
llvm-svn: 61821
2009-01-06 19:34:12 +00:00
Steve Naroff
1f42c2e94d
Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized.
...
This fix is C++ specific.
llvm-svn: 61816
2009-01-06 17:40:00 +00:00
Chris Lattner
a8a3f73a47
rename tok::annot_qualtypename -> tok::annot_typename, which is both
...
shorter and more accurate. The type name might not be qualified.
llvm-svn: 61788
2009-01-06 05:06:21 +00:00
Chris Lattner
b7895c4180
push the call in isCXXDeclarationSpecifier to TryAnnotateTypeOrScopeToken
...
down into the two cases that it can possibly affect. This avoids calls
to it that obviously can't do anything.
llvm-svn: 61651
2009-01-04 23:33:56 +00:00
Douglas Gregor
ec8806e8ec
Removed the warning
...
warning: statement was disambiguated as declaration
because it is currently firing in cases where the declaration would
not actually parse as a statement. We'd love to bring this warning
back if we can make it more accurate.
llvm-svn: 61137
2008-12-17 16:19:15 +00:00
Chris Lattner
399f9656ba
Teach tentative parsing to handle block pointers (rdar://6394309)
...
llvm-svn: 59853
2008-11-22 01:15:33 +00:00
Chris Lattner
3d31c6c823
remove the last couple obsolete forms of Parser::Diag.
...
llvm-svn: 59510
2008-11-18 07:50:21 +00:00
Argyrios Kyrtzidis
32a0379575
Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
...
No Sema functionality change, just the signatures of the Action/Sema methods.
llvm-svn: 58913
2008-11-08 16:45:02 +00:00
Argyrios Kyrtzidis
3a0558af9a
Just do a diagIfAmbiguous -> warnIfAmbiguous rename.
...
No functionality change.
llvm-svn: 57746
2008-10-17 23:23:35 +00:00
Argyrios Kyrtzidis
84a4df8c92
Issue a warning when there's an ambiguous function declarator (that could be a direct initializer for a variable defition).
...
Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524
llvm-svn: 57609
2008-10-15 23:21:32 +00:00
Argyrios Kyrtzidis
4217c7ec81
A tiny optimization; use isCXXFunctionDeclarator only when it's appropriate.
...
llvm-svn: 57141
2008-10-05 23:15:41 +00:00
Argyrios Kyrtzidis
279d9814e5
Add some text from the C++ standard and additional ambiguity resolution tests.
...
No funcitonality change.
llvm-svn: 57136
2008-10-05 21:10:08 +00:00
Argyrios Kyrtzidis
2b1ef227f5
Handle ambiguities between expressions and type-ids that occur inside parentheses, e.g.:
...
sizeof(int()) -> "int()" is type-id
sizeof(int()+1) -> "int()+1" is expression.
llvm-svn: 57131
2008-10-05 19:56:22 +00:00
Argyrios Kyrtzidis
df788f4eea
Found a subtle bug caused by an implicit enum-to-bool conversion (of the TentativeParsingResult enum).
...
This was the motivation of the following changes:
-'TentativeParsingResult' enum is replaced by a 'TPResult' class that basically encapsulates the enum.
-TPR_true, TPR_false, TPR_ambiguous, and TPR_error enum constants are replaced by TPResult::True(), TPResult::False(), etc. calls that return a TPResult object.
-Also fixed the subtle bug in Parser::isCXXFunctionDeclarator (caught by the above changes as a compilation error).
llvm-svn: 57125
2008-10-05 18:52:21 +00:00
Argyrios Kyrtzidis
2534620b4e
Fix Parser::isCXXConditionDeclaration to properly resolve declarations.
...
llvm-svn: 57111
2008-10-05 15:19:49 +00:00
Argyrios Kyrtzidis
71f3e19df0
Disambiguate between a declaration or expression for the 'condition' part of a if/switch/while/for statement.
...
llvm-svn: 57109
2008-10-05 15:03:47 +00:00
Argyrios Kyrtzidis
7b87f27438
Consider GNU attributes when doing ambiguity resolution.
...
llvm-svn: 57108
2008-10-05 14:27:18 +00:00
Argyrios Kyrtzidis
2c7137d8d1
Resolve ambiguous C++ statements (C++ 6.8p1).
...
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them.
llvm-svn: 57084
2008-10-05 00:06:24 +00:00