summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't wanr about "negative shifts" in code that is unreachable. Fixes PR 5544.Ted Kremenek2011-03-011-1/+3
| | | | llvm-svn: 126762
* On FreeBSD, make sure /usr/local/include is *not* in the default includeRoman Divacky2011-03-011-0/+1
| | | | | | | | path. This avoids accidentally including the wrong headers. Patch by Dimitry Andric! llvm-svn: 126761
* On FreeBSD, we don't want 'getDriver().Dir + "/../lib"' added to theRoman Divacky2011-03-011-4/+0
| | | | | | | | | | | | | ToolChain's FilePaths. If clang is installed as a port in /usr/local, it is *not* supposed to use /usr/local/lib by default, for example. Additionally, there are no clang-related executables in either /usr/libexec, or getDriver().Dir + "/../libexec", anymore, so remove that from the ToolChain's ProgramPaths. Patch by Dimitry Andric! llvm-svn: 126760
* For linking on FreeBSD, don't add a hardcoded "-L/usr/lib", butRoman Divacky2011-03-011-7/+7
| | | | | | | | | | | retrieve the library paths from the ToolChain object instead. Copy the relevant code from linuxtools::Link::ConstructJob(), and replace the std::string stuff with llvm::StringRef, while we're here. Patch by Dimitry Andric! llvm-svn: 126757
* Implement -mrtd which sets the StdCall calling convention to be the defaultRoman Divacky2011-03-015-4/+17
| | | | | | one. llvm-svn: 126756
* Add missing options.Roman Divacky2011-03-011-1/+2
| | | | llvm-svn: 126755
* objc IRGen for Next runtime message API.Fariborz Jahanian2011-03-012-6/+10
| | | | | | | | | | The prototype for objc_msgSend() is technically variadic - `id objc_msgSend(id, SEL, ...)`. But all method calls should use a prototype that matches the method, not the prototype for objc_msgSend itself(). // rdar://9048030 llvm-svn: 126754
* Revert r126748, my second attempt at nested-name-specifier sourceDouglas Gregor2011-03-0113-88/+39
| | | | | | location information for elaborated types. *sigh* llvm-svn: 126753
* Implement comparison of C++0x scoped enumeration types. Fixes PR9333.Douglas Gregor2011-03-011-0/+7
| | | | llvm-svn: 126752
* When digging into a cv-qualified return type that is a pointer type toDouglas Gregor2011-03-011-1/+1
| | | | | | | | diagnose ignored qualifiers on return types, only assume that there is a pointer chunk if the type is *structurally* a pointer type, not if it's a typedef of a pointer type. Fixes PR9328/<rdar://problem/9055428>. llvm-svn: 126751
* When building a type for a typename specifier, check specifically forDouglas Gregor2011-03-011-40/+34
| | | | | | | | | a dependent template name rather than (indirectly and incorrectly) trying to determine whether we can compute a context for the nested-name-specifier. Fixes a GCC testsuite regression, <rdar://problem/9068589>. llvm-svn: 126749
* Reinstate r126737, extending the generation of type-source locationDouglas Gregor2011-03-0113-45/+89
| | | | | | | | | | | | | | | | | | | | | | | | | information for qualifier type names throughout the parser to address several problems. The commit message from r126737: Push nested-name-specifier source location information into elaborated name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind". Aside from the normal changes, this also required some tweaks to the parser. Essentially, when we're looking at a type name (via getTypeName()) specifically for the purpose of creating an annotation token, we pass down the flag that asks for full type-source location information to be stored within the returned type. That way, we retain source-location information involving nested-name-specifiers rather than trying to reconstruct that information later, long after it's been lost in the parser. With this change, test/Index/recursive-cxx-member-calls.cpp is showing much improved results again, since that code has lots of nested-name-specifiers. llvm-svn: 126748
* Revert r126737, the most recent nested-name-specifier location change, for ↵Douglas Gregor2011-03-0110-74/+40
| | | | | | buildbot breakage. llvm-svn: 126746
* Disable more warnings so that it is safe to useRafael Espindola2011-03-011-0/+8
| | | | | | | CC="clang -use-gold-plugin -emit-llvm" CXX="clang++ -use-gold-plugin -emit-llvm" llvm-svn: 126740
* Move the bool-conversions behind the DiagRuntimeBehavior logic. It'sChandler Carruth2011-03-011-2/+2
| | | | | | | | | possible for these to show up due to metaprogramming both in unevaluated contexts and compile-time dead branches. Those aren't the bugs we're looking for. llvm-svn: 126739
* In preparation for fixing PR 6884, rework CFGElement to have getAs<> return ↵Ted Kremenek2011-03-017-76/+103
| | | | | | | | | pointers instead of fresh CFGElements. - Also, consoldiate getDtorKind() and getKind() into one "kind". - Add empty getDestructorDecl() method to CFGImplicitDtor. llvm-svn: 126738
* Push nested-name-specifier source location information into elaboratedDouglas Gregor2011-03-0110-40/+74
| | | | | | | | | | | | | | | | | | | name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind". Aside from the normal changes, this also required some tweaks to the parser. Essentially, when we're looking at a type name (via getTypeName()) specifically for the purpose of creating an annotation token, we pass down the flag that asks for full type-source location information to be stored within the returned type. That way, we retain source-location information involving nested-name-specifiers rather than trying to reconstruct that information later, long after it's been lost in the parser. With this change, test/Index/recursive-cxx-member-calls.cpp is showing much improved results again, since that code has lots of nested-name-specifiers. llvm-svn: 126737
* [analyzer] Also make sure that the parameter is coming from the current ↵Argyrios Kyrtzidis2011-03-011-4/+8
| | | | | | stack frame. llvm-svn: 126735
* [analyzer] Remove SVal::getAsVarDecl() and reason about MemRegions, not ↵Argyrios Kyrtzidis2011-03-012-27/+28
| | | | | | Decls. Suggestion by Ted! llvm-svn: 126734
* Use CharUnits for TypeAlign variable in LayoutWideBitField(). No change inKen Dyck2011-03-011-4/+5
| | | | | | functionality intended. llvm-svn: 126730
* Push nested-name-specifier source location information intoDouglas Gregor2011-03-017-29/+38
| | | | | | | | | | | | DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to walk DependentNameTypeLoc nodes. Also, teach libclang about TypedefDecl source ranges, so that we get those. The massive churn in test/Index/recursive-cxx-member-calls.cpp is a good thing: we're annotating a lot more of this test correctly now. llvm-svn: 126729
* [analyzer] Move lib/StaticAnalyzer/Checkers/ExprEngine.cpp -> ↵Argyrios Kyrtzidis2011-03-013-1/+1
| | | | | | | | lib/StaticAnalyzer/Core and hope the wrath of the buildbots will not descend upon me. llvm-svn: 126728
* Change the return type of GetVirtualPointersSize() to CharUnits. No changeKen Dyck2011-03-011-8/+10
| | | | | | in functionality intended. llvm-svn: 126727
* [analyzer] Rename CheckerV2 -> Checker.Argyrios Kyrtzidis2011-03-0148-103/+103
| | | | llvm-svn: 126726
* [analyzer] Remove Checker V1.Argyrios Kyrtzidis2011-03-014-9/+5
| | | | llvm-svn: 126725
* [analyzer] Remove checker V1 registration and running from ExprEngine.Argyrios Kyrtzidis2011-03-013-522/+83
| | | | llvm-svn: 126724
* Improves the coding style in SValBuilder. This patch:Zhanyong Wan2011-03-013-84/+86
| | | | | | | | | | | | | | - renames evalCastNL and evalCastL to evalCastFromNonLoc and evalCastFromLoc (avoid abbreviations that aren't well known). - makes all function parameter names start with a lower case letter for consistency and distinction from member variables. - avoids abbreviations in function parameter names. Reviewed by kremenek@apple.com. llvm-svn: 126722
* Fix some regressions in the GCC testsuite due to bad souce-locationDouglas Gregor2011-03-011-2/+6
| | | | | | information. Fixes <rdar://problem/9063643>. llvm-svn: 126721
* -fwrapv should turn off the inbounds markers from geps used for pointerChris Lattner2011-03-012-36/+60
| | | | | | | arithmetic. This is part of PR9256, it would be great if someone else wired up -fno-strict-overflow in the driver to -fwrapv. llvm-svn: 126718
* Refactor the construction of nested-name-specifiers withDouglas Gregor2011-02-283-225/+278
| | | | | | | | | | source-location information into a NestedNameSpecifierLocBuilder class, which lives within the AST library and centralize all knowledge of the format of nested-name-specifier location information here. No functionality change. llvm-svn: 126716
* Don't warn about "clang -use-gold-plugin -c ...". With this users can sayRafael Espindola2011-02-281-0/+2
| | | | | | | CC="clang -use-gold-plugin" CFLAGS=-emit-llvm ../configure... and not be hit with a warning for each .c file. llvm-svn: 126713
* Teach Sema::CheckTypenameType to use nested-name-specifiers withDouglas Gregor2011-02-285-39/+38
| | | | | | | | source-location information. We don't actually preserve this information in any of the resulting TypeLocs (yet), so it doesn't matter. llvm-svn: 126693
* Use single code path to handle c++ structs and classes while generating ↵Devang Patel2011-02-281-8/+6
| | | | | | debug info. llvm-svn: 126691
* [analyzer] Remove unused checker stuff from AnalysisConsumer and some unused ↵Argyrios Kyrtzidis2011-02-287-108/+5
| | | | | | headers. llvm-svn: 126690
* Push nested-name-specifier location information into DeclRefExpr andDouglas Gregor2011-02-289-95/+63
| | | | | | MemberExpr, the last of the expressions with qualifiers! llvm-svn: 126688
* Revert r126678.Fariborz Jahanian2011-02-281-13/+13
| | | | llvm-svn: 126685
* Push nested-name-specifier source location information intoDouglas Gregor2011-02-288-77/+107
| | | | | | | | | | | | | UnresolvedLookupExpr and UnresolvedMemberExpr. Also, improve the computation that checks whether the base of a member expression (either unresolved or dependent-scoped) is implicit. The previous check didn't cover all of the cases we use in our representation, which threw off source-location information for these expressions (which, in turn, caused some breakage in libclang's token annotation). llvm-svn: 126681
* objc IRGen for Next runtime message API.Fariborz Jahanian2011-02-281-13/+13
| | | | | | | | | | The prototype for objc_msgSend() is technically variadic - `id objc_msgSend(id, SEL, ...)`. But all method calls should use a prototype that matches the method, not the prototype for objc_msgSend itself(). // rdar://9048030 llvm-svn: 126678
* [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best ↵Argyrios Kyrtzidis2011-02-283-31/+0
| | | | | | misnomer award. llvm-svn: 126676
* [analyzer] Run the ExprEngine depending on the CheckerManager having ↵Argyrios Kyrtzidis2011-02-282-7/+24
| | | | | | path-sensitive checkers. llvm-svn: 126674
* [analyzer] The current UninitializedValuesChecker will go away, remove ↵Argyrios Kyrtzidis2011-02-281-8/+0
| | | | | | '-warn-uninit-values'. llvm-svn: 126673
* Kill 18 month old #if 0'd code in StmtXML.cppPeter Collingbourne2011-02-281-316/+0
| | | | llvm-svn: 126670
* Push nested-name-specifier source location information intoDouglas Gregor2011-02-287-72/+68
| | | | | | | | CXXDependentScopeMemberExpr, and clean up instantiation of nested-name-specifiers with dependent template specialization types in the process. llvm-svn: 126663
* [analyzer] Migrate NSErrorChecker and DereferenceChecker to CheckerV2.Argyrios Kyrtzidis2011-02-285-208/+263
| | | | | | | | They cooperate in that NSErrorChecker listens for ImplicitNullDerefEvent events that DereferenceChecker can dispatch. ImplicitNullDerefEvent is when we dereferenced a location that may be null. llvm-svn: 126659
* [analyzer] Introduce "event" mechanism in CheckerManager.Argyrios Kyrtzidis2011-02-282-0/+12
| | | | | | | | | A checker can register as receiver/listener of "events" (basically it registers a callback with a function getting called with an argument of the event type) and other checkers can register as "dispatchers" and can pass an event object to all the listeners. This allows cooperation amongst checkers but with very loose coupling. llvm-svn: 126658
* [analyzer] Run AST checkers for ObjCMethodDecls.Argyrios Kyrtzidis2011-02-281-0/+2
| | | | llvm-svn: 126657
* Eliminate the last remains of TemplateSpecializationTypes withDouglas Gregor2011-02-284-16/+120
| | | | | | | | dependent template names. There is still a lot of redundant code in TreeTransform to cope with TemplateSpecializationTypes, which I'll remove in stages. llvm-svn: 126656
* Make -fobjc-nonfragile-abi and -fgnu-runtime imply -fblocks (unless ↵David Chisnall2011-02-281-1/+4
| | | | | | -fno-blocks is specified), because this combination of flags defines an Objective-C runtime that includes a blocks runtime. llvm-svn: 126654
* Unbreak CMake buildDouglas Gregor2011-02-281-0/+1
| | | | llvm-svn: 126653
* From Vassil Vassilev:Axel Naumann2011-02-282-4/+59
| | | | | | | | * Add default implementations (no-op) for ExternalASTSource's pure virtual functions. There are valid use cases that can live with these defaults. * Move ExternalASTSource's out of line implementations into separate source file. * Whitespace, forward decl, #include cleanup. llvm-svn: 126648
OpenPOWER on IntegriCloud