aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseTentative.cpp
AgeCommit message (Collapse)Author
2008-11-08Implement support for C++ nested-name-specifiers ('foo::bar::x') in the ↵Argyrios Kyrtzidis
Parser side. No Sema functionality change, just the signatures of the Action/Sema methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17Just do a diagIfAmbiguous -> warnIfAmbiguous rename.Argyrios Kyrtzidis
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57746 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15Issue a warning when there's an ambiguous function declarator (that could be ↵Argyrios Kyrtzidis
a direct initializer for a variable defition). Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57609 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05A tiny optimization; use isCXXFunctionDeclarator only when it's appropriate.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57141 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Add some text from the C++ standard and additional ambiguity resolution tests.Argyrios Kyrtzidis
No funcitonality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57136 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Handle ambiguities between expressions and type-ids that occur inside ↵Argyrios Kyrtzidis
parentheses, e.g.: sizeof(int()) -> "int()" is type-id sizeof(int()+1) -> "int()+1" is expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57131 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Found a subtle bug caused by an implicit enum-to-bool conversion (of the ↵Argyrios Kyrtzidis
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57125 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Fix Parser::isCXXConditionDeclaration to properly resolve declarations.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57111 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Disambiguate between a declaration or expression for the 'condition' part of ↵Argyrios Kyrtzidis
a if/switch/while/for statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57109 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Consider GNU attributes when doing ambiguity resolution.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57108 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Resolve ambiguous C++ statements (C++ 6.8p1).Argyrios Kyrtzidis
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57084 91177308-0d34-0410-b5e6-96231b3b80d8