summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Constant expression evaluation: factor out handling of ignored values.Richard Smith2011-10-241-39/+15
| | | | llvm-svn: 142835
* In accordance with the C89, C99 and C++98 standards, ICEs can only containRichard Smith2011-10-241-3/+4
| | | | | | | floating-point literals if they are the immediate operands of casts. ImplicitCastExpr is not a cast in the language-standards sense. llvm-svn: 142832
* [analyzer] Convert ExprEngine::visit() to use short lived builders.Anna Zaks2011-10-247-240/+347
| | | | | | | | | | | This commit removes the major functional dependency on the ExprEngine::Builder member variable. In some cases the code became more verbose. Particularly, we call takeNodes() and addNodes() to move responsibility for the nodes from one builder to another. This will get simplified later on. llvm-svn: 142831
* [analyzer] Convert VisitDeclStmt to use local node builder.Anna Zaks2011-10-242-6/+13
| | | | llvm-svn: 142830
* [analyzer] Convert more functions (ex:evalBind()) to iterative buildersAnna Zaks2011-10-242-15/+34
| | | | llvm-svn: 142829
* [analyzer] Convert VisitUnaryOperator to use short lived Node buildersAnna Zaks2011-10-242-18/+31
| | | | | | | | | | To convert iteratively, we take the nodes the local builder will process from the from the global builder and add the generated nodes after the short lived builder is done. PureStmtNodeBuilder is the one we should eventually use everywhere. Added Stmt index and Builder context as ExprEngine globals. To avoid passing them around. llvm-svn: 142828
* [analyzer] Use a temporary builder in CheckerContext.Anna Zaks2011-10-244-22/+35
| | | | | | | First step toward removing the global Stmt builder. Added several transitional methods (like takeNodes/addNodes). + Stop early if the set of exploded nodes for the next iteration is empty. llvm-svn: 142827
* [analyzer] Pass external Dst set to NodeBuilderAnna Zaks2011-10-243-36/+27
| | | | | | | | This moves the responsibility for storing the output node set from the builder to the clients. The builder is just responsible for transforming an input set into the output set: {SrcSet/SrcNode} -> {Frontier}. llvm-svn: 142826
* Simplify parsing ellipsis in Parser::ParseAlignArgument, spotted by Doug.Peter Collingbourne2011-10-241-4/+2
| | | | llvm-svn: 142814
* Constant expression evaluation: factor out VarDecl initializer evaluation andRichard Smith2011-10-241-68/+42
| | | | | | caching. llvm-svn: 142812
* Minor refactoring of my last patch. Per Doug's suggestion.Fariborz Jahanian2011-10-241-1/+1
| | | | llvm-svn: 142807
* [libclang] Make sure we don't try to erase past the StoredDiagnostics vector.Argyrios Kyrtzidis2011-10-241-13/+7
| | | | | | Ted came upon the bug but I couldn't make a test out of it. llvm-svn: 142805
* Fix mismatched new[]/delete[].Benjamin Kramer2011-10-241-1/+1
| | | | llvm-svn: 142803
* Have -fms-no-extensions turn off -fms-compatibilityDouglas Gregor2011-10-241-2/+6
| | | | llvm-svn: 142798
* Make -fms-compatibility imply -fms-extensions. Fixes PR11204.Douglas Gregor2011-10-241-1/+4
| | | | llvm-svn: 142797
* Remove debugging printfs that some idiot left in.David Chisnall2011-10-241-3/+0
| | | | llvm-svn: 142796
* Enable experimental support for objc_msgSend with GNUstep ObjC runtime.David Chisnall2011-10-241-9/+32
| | | | llvm-svn: 142795
* Actually rename the file AnalysisContext.cpp -> AnalysisDeclContext.cppChandler Carruth2011-10-241-0/+0
| | | | | | | to match the CMakeLists.txt change in r142782; this should fix the CMake build. llvm-svn: 142784
* Rename AnalysisContext to AnalysisDeclContext. Not only is this name more ↵Ted Kremenek2011-10-2424-105/+105
| | | | | | accurate, but it frees up the name AnalysisContext for other uses. llvm-svn: 142782
* Fix grammar for C++11 alignment specifiers, and add a few FIXMEs.Peter Collingbourne2011-10-232-11/+31
| | | | llvm-svn: 142760
* Diagnose unexpanded parameter packs in member initialisers (includingPeter Collingbourne2011-10-231-0/+9
| | | | | | in-class member initialisers). llvm-svn: 142758
* Clean up duplicated code in Sema::BuildMemInitializer.Peter Collingbourne2011-10-231-14/+3
| | | | llvm-svn: 142757
* Improve unexpanded parameter pack diagnostics by using UPPC_Initializer here.Peter Collingbourne2011-10-231-2/+3
| | | | llvm-svn: 142756
* Attach class template attributes to the templated CXXRecordDecl,Peter Collingbourne2011-10-231-1/+4
| | | | | | | | | instead of silently discarding them. As a side effect, this improves diagnostics for constexpr class templates slightly. llvm-svn: 142755
* [analyzer] Remove LocationContext creation methods from AnalysisManager, and ↵Ted Kremenek2011-10-236-22/+45
| | | | | | | | change clients to use AnalysisContext instead. WIP to remove/reduce ExprEngine's usage of AnalysisManager. llvm-svn: 142739
* Fix a typo that completely broke the expansion of complex arguments.Bob Wilson2011-10-221-1/+1
| | | | llvm-svn: 142734
* Refactor vector constant expression evaluation to return bool like all the otherRichard Smith2011-10-221-47/+56
| | | | | | | const expression evaluation subclasses, and remove some APValue copying and malloc traffic in the process. llvm-svn: 142733
* Remove obsolete debugging macro, make helper static.Benjamin Kramer2011-10-221-7/+5
| | | | llvm-svn: 142730
* Pack struct better.Benjamin Kramer2011-10-223-3/+3
| | | | llvm-svn: 142725
* lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add ↵NAKAMURA Takumi2011-10-221-1/+1
| | | | | | -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts. llvm-svn: 142720
* Only emit implicit constant conversion truncation warnings in reachable ↵Ted Kremenek2011-10-221-3/+5
| | | | | | code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>. llvm-svn: 142716
* Refactor ThreadSafety to use PostOrderCFGView instead of its own copy (of ↵Ted Kremenek2011-10-221-83/+7
| | | | | | TopologicallySortedCFG). llvm-svn: 142714
* Pull TopologicallySortedCFG out of LiveVariables into its own analysis: ↵Ted Kremenek2011-10-223-105/+55
| | | | | | PostOrderCFGView. llvm-svn: 142713
* Fixes a minor hick up to my last patch.Fariborz Jahanian2011-10-221-2/+6
| | | | llvm-svn: 142711
* objc: private methods can have their attributes, no diagnostic is required.Fariborz Jahanian2011-10-221-7/+30
| | | | | | | None private methods if their implementation have attribute, they must exactly match those in their declarations. // rdar://10271563 llvm-svn: 142709
* Make changes necessary for N32/64 ABI conformance.Akira Hatanaka2011-10-221-9/+25
| | | | | | | - Size of long double is 16 bytes for both N32 and N64. - Size of pointers and long is 8 bytes for N64. llvm-svn: 142705
* Fix PR11073 by adding the argument type information to the decl we constructEric Christopher2011-10-211-3/+10
| | | | | | | | for the function type. Update a testcase accordingly. Patch initially by Anders Waldenborg! llvm-svn: 142700
* [PCH] When serializing Stmts, keep track of when sub statements are ↵Argyrios Kyrtzidis2011-10-212-4/+58
| | | | | | | | | | | | referenced again and in such a case just write out a reference of a previously serialized Stmt, instead of serializing it all over again. This saves memory + space + [de]serializing time, and avoids blowing up memory with pathological cases. rdar://10293911 llvm-svn: 142696
* Don't try to set the "array filler" in a InitListExpr twice.Argyrios Kyrtzidis2011-10-212-2/+4
| | | | llvm-svn: 142695
* More ASTRecordLayout changes for MS ABI; based on patch by r4start.Eli Friedman2011-10-212-25/+35
| | | | llvm-svn: 142694
* c++: support gcc's application of weak attribute onFariborz Jahanian2011-10-213-0/+10
| | | | | | | | | | | | | class declaration which forces any such class and any class that inherits from such a class to have their typeinfo symbols be marked as weak. // rdar://10246395 A test/CodeGenCXX/weak-extern-typeinfo.cpp M lib/Sema/SemaDeclCXX.cpp M lib/Sema/SemaDeclAttr.cpp M lib/CodeGen/CGRTTI.cpp llvm-svn: 142693
* Added support for thread safety attributes on destructors.DeLesley Hutchins2011-10-211-2/+27
| | | | llvm-svn: 142685
* Thread safety analysis refactoring: invalid lock expressions.DeLesley Hutchins2011-10-212-32/+69
| | | | llvm-svn: 142666
* Thread safety analysis: add support for attributes on constructors.DeLesley Hutchins2011-10-211-56/+78
| | | | llvm-svn: 142665
* objective-c: Diagnose redeclaration of privateFariborz Jahanian2011-10-211-0/+22
| | | | | | ivars in class extensions. // rdar://10309454 llvm-svn: 142664
* Refactoring and code cleanup.DeLesley Hutchins2011-10-211-65/+100
| | | | llvm-svn: 142654
* When performing name lookup for the previous declaration of a field,Douglas Gregor2011-10-211-8/+17
| | | | | | | | be sure to consider all of the possible lookup results. We were assert()'ing (but behaving correctly) for unresolved values. Fixes PR11134 / <rdar://problem/10290422>. llvm-svn: 142652
* Permit auto SCS on parameter declarations, C++03 [dcl.stc]p2Peter Collingbourne2011-10-211-0/+5
| | | | llvm-svn: 142649
* Treat the Microsoft/Borland keyword "__except" as a context-sensitiveDouglas Gregor2011-10-212-3/+17
| | | | | | | keyword, because both libstdc++ and libc++ use "__except" as an identifier. Fixes <rdar://problem/10322555>. llvm-svn: 142636
* I added a new function to DeclContext calledSean Callanan2011-10-212-34/+52
| | | | | | | | | | | | | | | | | | | addDeclInternal(). This function suppresses any calls to FindExternalVisibleDeclsByName() while a Decl is added to a DeclContext. This behavior is required for the ASTImporter, because in the case of the LLDB client the ASTImporter would be called recursively to import the visible decls, which leads to assertions because the recursive call is seeing partially-formed types. I also modified the ASTImporter to use addDeclInternal() in all places where it would otherwise use addDecl(). This fix should not affect the rest of Clang, passes Clang's testsuite, and fixes several serious LLDB bugs. llvm-svn: 142634
OpenPOWER on IntegriCloud