summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Use hasSameType to compare types for equality.Abramo Bagnara2010-12-171-1/+2
| | | | llvm-svn: 122058
* Avoid to emit redundant implicit cast for enum constants init expressions.Abramo Bagnara2010-12-172-2/+1
| | | | llvm-svn: 122056
* Update checker build.Ted Kremenek2010-12-171-1/+1
| | | | llvm-svn: 122051
* Remove explicit summaries from retain/releaseTed Kremenek2010-12-171-26/+0
| | | | | | | checker that are automatically handled now by the Cocoa conventions logic. llvm-svn: 122047
* Fix assertion failure in cocoa::deriveNamingConvention()Ted Kremenek2010-12-172-4/+10
| | | | | | when the selector is the string 'mutable'. llvm-svn: 122046
* fix typoChris Lattner2010-12-172-2/+2
| | | | llvm-svn: 122041
* Move CocoaConventions.[h,cpp] from libCheckerTed Kremenek2010-12-175-5/+5
| | | | | | | | | to libAnalysis. Similar to Format (format string checking), CocoaConventions has the potential to serve clients other than the static analyzer. llvm-svn: 122040
* Revise Cocoa conventions detection: 'copy' and 'mutableCopy'Ted Kremenek2010-12-173-60/+40
| | | | | | | | only indicates the create rule if it starts at the beginning of the method name, not within the method name. llvm-svn: 122036
* Rename several methods/functions in the analyzerTed Kremenek2010-12-173-92/+92
| | | | | | | to start with lowercase characters. No functionality change. llvm-svn: 122035
* Give hidden visibility to RTTI for derived types. This is kindof a hackyJohn McCall2010-12-172-3/+15
| | | | | | way to do this, but it fixes rdar://problem/8778973 llvm-svn: 122033
* Microsoft's __uuidof operator returns a lvalue. Part 2.Francois Pichet2010-12-171-2/+2
| | | | llvm-svn: 122030
* Microsoft's __uuidof operator returns a lvalue.Francois Pichet2010-12-172-1/+3
| | | | llvm-svn: 122021
* Getting Started: Add VS2010 instructions and specify an out of source build.Michael J. Spencer2010-12-161-4/+7
| | | | llvm-svn: 122003
* Do lvalue-to-rvalue conversions on the LHS of a shift operator.John McCall2010-12-163-10/+8
| | | | | | Fixes rdar://problem/8776586. llvm-svn: 121992
* Add tests checking for unexpanded parameter packs in declarations thatDouglas Gregor2010-12-164-7/+38
| | | | | | | occur within statements. Teach Sema::ActOnExceptionDeclarator() to check for unexpanded parameter packs in the exception type. llvm-svn: 121984
* Tweak a commentDouglas Gregor2010-12-161-1/+1
| | | | llvm-svn: 121979
* Delay the check for unexpanded parameter packs in the types ofDouglas Gregor2010-12-161-8/+41
| | | | | | | | non-type template parameters until we know that we have an actual template declaration of some sort. This cannot be tested yet, but will become important when we have template template parameter packs. llvm-svn: 121967
* Check for unexpanded parameter packs in non-type template parameter types.Douglas Gregor2010-12-164-12/+24
| | | | llvm-svn: 121964
* Check for unexpanded parameter packs in default arguments.Douglas Gregor2010-12-166-10/+77
| | | | llvm-svn: 121962
* Tweak location of diagnostic for -Wunreachable-codeTed Kremenek2010-12-161-2/+4
| | | | | | | | | | test due to recent changes to the CFG. The diagnostic is somewhat in the wrong place, but the -Wunreachable-code diagnostic needs to be revamped anyway since most of the diagnostics in this test case are redundant. llvm-svn: 121961
* Start migration of static analyzer to using theTed Kremenek2010-12-1622-620/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit lvalue-to-rvalue casts that John McCall recently introduced. This causes a whole bunch of logic in the analyzer for handling lvalues to vanish. It does, however, raise a few issues in the analyzer w.r.t to modeling various constructs (e.g., field accesses to compound literals). The .c/.m analysis test cases that fail are due to a missing lvalue-to-rvalue cast that will get introduced into the AST. The .cpp failures were more than I could investigate in one go, and the patch was already getting huge. I have XFAILED some of these tests, and they should obviously be further investigated. Some highlights of this patch include: - CFG no longer requires an lvalue bit for CFGElements - StackFrameContext doesn't need an 'asLValue' flag - The "VisitLValue" path from GRExprEngine has been eliminated. Besides the test case failures (XFAILed), there are surely other bugs that are fallout from this change. llvm-svn: 121960
* CMake: Add runtime dir.Michael J. Spencer2010-12-162-1/+13
| | | | llvm-svn: 121957
* MemoryBuffer API update.Michael J. Spencer2010-12-167-53/+39
| | | | llvm-svn: 121956
* Update for LLVM API change.Daniel Dunbar2010-12-161-2/+5
| | | | llvm-svn: 121950
* Fix a regression I caused in r121930. It turns out thatDouglas Gregor2010-12-161-3/+7
| | | | | | | DeclarationNameInfo instances don't always have a non-NULL TypeSourceInfo? llvm-svn: 121940
* Check for unexpanded parameter packs within variable initializers.Douglas Gregor2010-12-165-26/+53
| | | | llvm-svn: 121938
* Check for unexpanded parameter packs in friend declarations.Douglas Gregor2010-12-165-5/+28
| | | | llvm-svn: 121934
* Improve diagnostics when property being looked upFariborz Jahanian2010-12-163-0/+21
| | | | | | in a forward @class object. // rdar://8774513 llvm-svn: 121933
* Check for unexpanded parameter packs in using declarations. As aDouglas Gregor2010-12-166-9/+97
| | | | | | | drive-by, make sure to check for unexpanded parameter packs within the name of a declaration. llvm-svn: 121930
* Check for unexpanded parameter packs in enumeration types and enumerators.Douglas Gregor2010-12-164-6/+25
| | | | llvm-svn: 121928
* Check for unexpanded parameter packs in static assertion expressions.Douglas Gregor2010-12-154-5/+12
| | | | llvm-svn: 121922
* Implement builtins for Neon half-precision float conversions.Bob Wilson2010-12-152-2/+11
| | | | | | | Also tweak the VCVT_F32_F16 entry in arm_neon.td to be more consistent with the other floating-point conversion builtins. Radar 8068427. llvm-svn: 121916
* ivars craeted for explicit @synthesize and thoseFariborz Jahanian2010-12-154-6/+43
| | | | | | | created for auto-synthesis are @private. Fixes: // rdar://8769582 llvm-svn: 121913
* Check for unexpanded parameter packs in various kinds ofDouglas Gregor2010-12-155-12/+58
| | | | | | | | declarations. This is a work in progress, as I go through the C++ declaration grammar to identify where unexpanded parameter packs can occur. llvm-svn: 121912
* Teach the RecursiveASTVisitor to traverse the type-locationDouglas Gregor2010-12-151-6/+6
| | | | | | information for all of the explicit casts. llvm-svn: 121900
* Test that all of the relevant types properly compute the "containsDouglas Gregor2010-12-152-6/+97
| | | | | | | unexpanded parameter pack" bit and that the recursive AST visitor can then find those unexpanded parameter packs. llvm-svn: 121899
* Introduce a RecursiveASTVisitor subclass that finds all unexpandedDouglas Gregor2010-12-153-10/+169
| | | | | | | | | | | | | | | | parameter packs within a statement, type, etc. Use this visitor to provide improved diagnostics for the presence of unexpanded parameter packs in a full expression, base type, declaration type, etc., by highlighting the unexpanded parameter packs and providing their names, e.g., test/CXX/temp/temp.decls/temp.variadic/p5.cpp:28:85: error: declaration type contains unexpanded parameter packs 'VeryInnerTypes', 'OuterTypes', ... ...VeryInnerTypes, OuterTypes>, pair<InnerTypes, OuterTypes> > types; ~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ^ llvm-svn: 121883
* Fix diagnostic pragmas.Argyrios Kyrtzidis2010-12-1523-117/+454
| | | | | | | | | | | | Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state. Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect a lot of places, like C++ inline methods, template instantiations, the lexer, etc. Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location. Fixes rdar://8365684. llvm-svn: 121873
* Move the work-in-progress implementation of variadic templates to its own ↵Douglas Gregor2010-12-153-29/+47
| | | | | | file in Sema. No functionality change. llvm-svn: 121869
* Reorganize LookupMemberExpr for clarity and to make the obvious fast pathsJohn McCall2010-12-151-267/+321
| | | | | | come first. llvm-svn: 121866
* __attribute__((nonnull)) can apply to reference-to-pointerDouglas Gregor2010-12-152-2/+13
| | | | | | parameters. Fixes <rdar://problem/8769025>. llvm-svn: 121864
* Sema: have BuildExpressionFromIntegralTemplateArgument produce well-formed ↵Peter Collingbourne2010-12-152-1/+16
| | | | | | | | | | | | | IntegerLiterals BuildExpressionFromIntegralTemplateArgument can produce malformed IntegerLiterals with an EnumType if the template parameter type is an EnumType. This breaks the AST printer which expects all IntegerLiterals to have a plain integer type. Instead, give the IntegerLiteral the enum's promotion type and wrap in an implicit cast to the EnumType. llvm-svn: 121862
* Silence GCC warning about control reaching the end of the function and ↵Chandler Carruth2010-12-151-0/+2
| | | | | | explicitly mark that all cases are handled. llvm-svn: 121855
* Fix gcc warning: 'clang::ASTStmtReader' is already a friend of ↵Nico Weber2010-12-151-2/+0
| | | | | | 'clang::OverloadExpr' llvm-svn: 121852
* Sundry missing lvalue-to-rvalue conversions. Also leave a TODO for the vitalJohn McCall2010-12-153-7/+19
| | | | | | | future task of performing contextual conversion to size_t in a VLA size expression. :) llvm-svn: 121836
* Set the "implicitly inline" bit on a method as soon as we see a definitionJohn McCall2010-12-154-24/+60
| | | | | | | | within the class. Teach IR gen to look for function definitions in record lexical contexts when deciding whether to emit a function whose address was taken. Fixes PR8789. llvm-svn: 121833
* Variadic templates: extend the Expr class with a bit that specifiesDouglas Gregor2010-12-1517-308/+572
| | | | | | | | | | | | | | | | | | whether the expression contains an unexpanded parameter pack, in the same vein as the changes to the Type hierarchy. Compute this bit within all of the Expr subclasses. This change required a bunch of reshuffling of dependency calculations, mainly to consolidate them inside the constructors and to fuse multiple loops that iterate over arguments to determine type dependence, value dependence, and (now) containment of unexpanded parameter packs. Again, testing is painfully sparse, because all of the diagnostics will change and it is more important to test the to-be-written visitor that collects unexpanded parameter packs. llvm-svn: 121831
* Function types are compatible (in the C sense) if their regparms are identical.John McCall2010-12-151-16/+20
| | | | llvm-svn: 121821
* Added missing IgnoreParens().Abramo Bagnara2010-12-1414-32/+47
| | | | llvm-svn: 121795
* Rewrite ComplexExprEvaluator::VisitCastExpr to use cast kinds, and fixJohn McCall2010-12-142-82/+127
| | | | | | | the basic casting logic to insert intermediate casts and preserve the exact complex-cast design. Fixes a crash in the test suite. llvm-svn: 121776
OpenPOWER on IntegriCloud