summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/decl-expr-ambiguity.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Initial implementation of argument dependent lookup (a.k.a. ADL,Douglas Gregor2009-02-041-2/+2
| | | | | | | | | | | | a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for two: - In an unqualified call g(x), even if the name does not refer to anything in the current scope, we can still find functions named "g" based on ADL. We don't yet have this ability. - ADL will need updating for friend functions and templates. llvm-svn: 63692
* Removed the warningDouglas Gregor2008-12-171-6/+6
| | | | | | | | | | 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
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-1/+1
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* implement a fixme by making warnings for ++/-- on non-modifiable-lvalues better.Chris Lattner2008-11-181-2/+2
| | | | llvm-svn: 59484
* Initial step toward supporting qualification conversions (C++ 4.4).Douglas Gregor2008-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | Changes: - Sema::IsQualificationConversion determines whether we have a qualification conversion. - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++, performing an implicit conversion from the right-hand side to the type of the left-hand side rather than checking based on the C notion of "compatibility". We now rely on the implicit-conversion code to determine whether the conversion can happen or not. Sema::TryCopyInitialization has an ugly reference-related hack to cope with the initialization of references, for now. - When building DeclRefExprs, strip away the reference type, since there are no expressions whose type is a reference. We'll need to do this throughout Sema. - Expr::isLvalue now permits functions to be lvalues in C++ (but not in C). llvm-svn: 57935
* Tweak an expected-error to match the output. IMHO it is better to diagnose ↵Gabor Greif2008-10-211-1/+1
| | | | | | 'int (void)' because it has the same meaning in C and C++. llvm-svn: 57901
* Issue a warning when there's an ambiguous function declarator (that could be ↵Argyrios Kyrtzidis2008-10-151-1/+2
| | | | | | | | a direct initializer for a variable defition). Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524 llvm-svn: 57609
* Add some text from the C++ standard and additional ambiguity resolution tests.Argyrios Kyrtzidis2008-10-051-1/+16
| | | | | | No funcitonality change. llvm-svn: 57136
* Handle ambiguities between expressions and type-ids that occur inside ↵Argyrios Kyrtzidis2008-10-051-0/+2
| | | | | | | | | parentheses, e.g.: sizeof(int()) -> "int()" is type-id sizeof(int()+1) -> "int()+1" is expression. llvm-svn: 57131
* Found a subtle bug caused by an implicit enum-to-bool conversion (of the ↵Argyrios Kyrtzidis2008-10-051-0/+1
| | | | | | | | | | | | 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
* Disambiguate between a declaration or an expression, in the ↵Argyrios Kyrtzidis2008-10-051-0/+1
| | | | | | 'for-init-statement' part of a 'for' statement. llvm-svn: 57112
* Fix Parser::isCXXConditionDeclaration to properly resolve declarations.Argyrios Kyrtzidis2008-10-051-0/+1
| | | | llvm-svn: 57111
* Disambiguate between a declaration or expression for the 'condition' part of ↵Argyrios Kyrtzidis2008-10-051-0/+1
| | | | | | a if/switch/while/for statement. llvm-svn: 57109
* Consider GNU attributes when doing ambiguity resolution.Argyrios Kyrtzidis2008-10-051-0/+1
| | | | llvm-svn: 57108
* Resolve ambiguous C++ statements (C++ 6.8p1).Argyrios Kyrtzidis2008-10-051-0/+20
'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
OpenPOWER on IntegriCloud