summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* It turns out that basically every caller to RequireCompleteDeclContextJohn McCall2010-05-018-61/+49
| | | | | | | already knows what context it's looking in. Just pass that context in instead of (questionably) recalculating it. llvm-svn: 102818
* Fix NON_ANSI_COMPILE_FLAGS setting, for MSVC.Daniel Dunbar2010-05-011-1/+1
| | | | llvm-svn: 102811
* Add null check in CFGBuilder::VisitStmt() to make CFG constructionTed Kremenek2010-04-301-0/+4
| | | | | | more resilient to bad code. llvm-svn: 102793
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-3021-19/+19
| | | | | | (C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
* Don't perform AnalysisBasedWarnings in Sema or run the static analyzer when aTed Kremenek2010-04-302-7/+6
| | | | | | fatal error has occurred. llvm-svn: 102778
* After substituting a template argument for a non-type templateDouglas Gregor2010-04-302-2/+36
| | | | | | | | | parameter with pointer-to-member type, we may have to perform a qualification conversion, since the pointee type of the parameter might be more qualified than the pointee type of the argument we form from the declaration. Fixes PR6986. llvm-svn: 102777
* When synthesizing Objective C records, give the synthetic fields publicJohn McCall2010-04-302-1/+9
| | | | | | | | access. Fixes an assertion. Fixes rdar://problem/7927811. Too lazy to reduce a test case. llvm-svn: 102776
* Fix a thinko that caused us not to compute __builtin_offset as aDouglas Gregor2010-04-303-1/+8
| | | | | | constant expression in C. llvm-svn: 102762
* Teach clang_getLocation() to cope with a NULL file argument.Douglas Gregor2010-04-301-2/+2
| | | | llvm-svn: 102748
* Remove an unnecessary parameter from EmitClassCopyAssignment.Anders Carlsson2010-04-302-13/+7
| | | | llvm-svn: 102747
* Clean up our handling of local instantiation scopes, which keep trackDouglas Gregor2010-04-306-77/+95
| | | | | | | | | | | | | | | | | | | | | of the mapping from local declarations to their instantiated counterparts during template instantiation. Previously, we tried to do some unholy merging of local instantiation scopes that involved storing a single hash table along with an "undo" list on the side... which was ugly, and never handled function parameters properly. Now, we just keep separate hash tables for each local instantiation scope, and "combining" two scopes means that we'll look in each of the combined hash tables. The combined scope stack is rarely deep, and this makes it easy to avoid the "undo" issues we were hitting. Also, I've simplified the logic for function parameters: if we're declaring a function and we need the function parameters to live longer, we just push them back into the local instantiation scope where we need them. Fixes PR6990. llvm-svn: 102732
* Move include installation steps to better location, inside each include dir ↵Daniel Dunbar2010-04-305-29/+59
| | | | | | | | instead of at the top-level. Also, don't set NO_INSTALL=1 for c-index-test. llvm-svn: 102724
* Fixed incorrect type of alloca (GNU runtime).David Chisnall2010-04-301-2/+5
| | | | llvm-svn: 102711
* Add calling convention related attributes to related declaration. Mark ↵Abramo Bagnara2010-04-304-19/+73
| | | | | | attributes invalid on type related checking so to add them to declarations only when everything is ok. llvm-svn: 102710
* Attribute noreturn is now put in declaration attributes. Fixed a double ↵Abramo Bagnara2010-04-303-18/+18
| | | | | | warning generation. llvm-svn: 102705
* An edge from a call expression to the exit block is only an abnormal edgeJohn McCall2010-04-302-1/+11
| | | | | | | | | | | if *none* of the successors of the call expression is the exit block. This matters when a call of bool type is the condition of (say) a while loop in a function with no statements after the loop. This *can* happen in C, but it's much more common in C++ because of overloaded operators. Suppresses some substantial number of spurious -Wmissing-noreturn warnings. llvm-svn: 102696
* Fix ADL for types declared in transparent decls, from Alp Toker!Douglas Gregor2010-04-302-18/+31
| | | | llvm-svn: 102695
* Introduce a sequence number into class template partialDouglas Gregor2010-04-305-40/+51
| | | | | | | | | | | specializations, which keeps track of the order in which they were originally declared. We use this number so that we can always walk the list of partial specializations in a predictable order during matching or template instantiation. This also fixes a failure in Boost.Proto, where SourceManager::isBeforeInTranslationUnit was behaving poorly in inconsistent ways. llvm-svn: 102693
* Account for the VTT argument when making an implicit copy constructor forJohn McCall2010-04-302-1/+25
| | | | | | | | | a class with virtual bases. Just a patch until Sema starts (correctly) doing most of this analysis. Fixes PR 6622. llvm-svn: 102692
* When we start the definition of a class template, set theDouglas Gregor2010-04-303-0/+22
| | | | | | | | | InjectedClassNameType's Decl to point at the definition. It's a little messy, but we do the same thing with classes and their record types, since much of Clang expects that the TagDecl* one gets out of a type is the definition. Fixes several Boost.Proto failures. llvm-svn: 102691
* Remove unused trait.Zhongxing Xu2010-04-301-9/+0
| | | | llvm-svn: 102690
* Refactor the AnalysisConsumer to analyze functions after the whole Zhongxing Xu2010-04-307-148/+82
| | | | | | | | | | | | | | | | | | | | | | | | | translation unit is parsed. This enables us to inline some calls when still analyzing one function at a time. Actions are classified into Function, CXXMethod, ObjCMethod, ObjCImplementation. This does not hurt performance much. The analysis time for sqlite3.c: before: real 17m52.440s user 17m49.460s sys 0m2.010s after: real 18m0.500s user 17m56.900s sys 0m2.330s DisplayProgress option is broken now. -inine-call action is removed. It will be reenabled in another form, perhaps as an indenpendant option. llvm-svn: 102689
* Fix a tentative-parse error with unqualified template ids in cast expressions.John McCall2010-04-302-3/+19
| | | | | | Also resolve a long-working FIXME in the test case I modified. llvm-svn: 102688
* Fix pasto in this testDouglas Gregor2010-04-301-1/+1
| | | | llvm-svn: 102687
* Add Clang version inspection macros. Fixes PR6681.Douglas Gregor2010-04-303-2/+57
| | | | llvm-svn: 102686
* Fix -fno-rtti -fexceptions by forcing the emission of (non-"builtin") RTTIJohn McCall2010-04-304-11/+71
| | | | | | when used by the exceptions routines. Fixes PR 6974. llvm-svn: 102684
* logical ops, unary ops, pairwise opsNate Begeman2010-04-301-17/+90
| | | | llvm-svn: 102681
* Teach EHCleanupBlock to deal appropriately with the possibility that thereJohn McCall2010-04-301-1/+5
| | | | | | might not have been an insertion block set at start. Fixes PR6975. llvm-svn: 102677
* Get the base class addresses before calling EmitClassCopyAssignment.Anders Carlsson2010-04-301-5/+8
| | | | llvm-svn: 102676
* Remove an unnecessary argument to EmitClassCopyAssignment.Anders Carlsson2010-04-292-11/+8
| | | | llvm-svn: 102674
* Rebuild the nested name specifiers in member-pointer declarator chunks whenJohn McCall2010-04-295-70/+172
| | | | | | | | | entering the current instantiation. Set up a little to preserve type location information for typename types while we're in there. Fixes a Boost failure. llvm-svn: 102673
* Comparisons.Nate Begeman2010-04-291-0/+54
| | | | llvm-svn: 102669
* Do not enable '-analyze-check-security-syntactic' by default when using ↵Ted Kremenek2010-04-291-1/+3
| | | | | | | | '--analyze'. There are several known issues to address for it should be turned on by default. llvm-svn: 102664
* When determining a standard conversion sequence involves resolving theDouglas Gregor2010-04-294-51/+60
| | | | | | | | | | | | | | | | | | | | | address of an overloaded function (or function template), perform that resolution prior to determining the implicit conversion sequence. This resolution is not part of the implicit conversion sequence itself. Previously, we would always consider this resolution to be a function pointer decay, which was a lie: there might be an explicit & in the expression, in which case decay should not occur. This caused the CodeGen assertion in PR6973 (where we created a pointer to a pointer to a function when we should have had a pointer to a function), but it's likely that there are corner cases of overload resolution where this would have failed. Cleaned up the code involved in determining the type that will produced afer resolving the overloaded function reference, and added an assertion to make sure the result is correct. Fixes PR6973. llvm-svn: 102650
* Properties cannot be synthesized by-dafult inFariborz Jahanian2010-04-292-1/+11
| | | | | | | categories. Issue usual warnings instead of confusing error message. Radar 7920807 llvm-svn: 102645
* Use clang::VarDecl name instead of llvm::GlobalVariable name.Devang Patel2010-04-292-3/+7
| | | | | | llvm::GLobalVariable name may not match user visibile name for function static variables. llvm-svn: 102644
* Add USR support for 'static inline' functions (which can be declared in ↵Ted Kremenek2010-04-292-33/+61
| | | | | | | | header files). Add USR support for 'static' functions and local variables, which can be handy for resolving named variables within a translation unit. llvm-svn: 102641
* Remove USRGenerator::VisitBlockDecl(). We don't need to generate USRs for ↵Ted Kremenek2010-04-291-7/+0
| | | | | | | | blocks, since they have no linkage and by definition are anonymous. llvm-svn: 102640
* Add test case for __has_feature(objc_weak_class).Ted Kremenek2010-04-291-0/+4
| | | | llvm-svn: 102639
* Start stamping out the __builtin_neon stuff.Nate Begeman2010-04-291-25/+94
| | | | llvm-svn: 102638
* Add FunctionDecl::isVariadic() to match BlockDecl::isVariadic() and ↵Ted Kremenek2010-04-293-8/+12
| | | | | | | | ObjCMethodDecl::isVariadic(). Do some minor refactoring along the way. llvm-svn: 102635
* Rename BlockDecl::IsVariadic() to BlockDecl::isVariadic() to match the casingTed Kremenek2010-04-292-5/+5
| | | | | | for similar methods. No functionality change. llvm-svn: 102634
* IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid ↵Daniel Dunbar2010-04-291-2/+4
| | | | | | DeclContext, to satisfy the invariants that should hold on a RecordDecl. llvm-svn: 102624
* Remove a FIXME that is unlikely to be fixed (streaming code generation).Daniel Dunbar2010-04-291-20/+16
| | | | llvm-svn: 102623
* Frontend: Tie backend verification passes to CodeGenOptions::VerifyModule,Daniel Dunbar2010-04-292-10/+1
| | | | | | instead of NDEBUG. llvm-svn: 102622
* Bump Clang version number.Ted Kremenek2010-04-292-3/+3
| | | | llvm-svn: 102614
* When performing partial ordering of class template partialDouglas Gregor2010-04-292-1/+41
| | | | | | | | | specializations, substitute the deduced template arguments and check the resulting substitution before concluding that template argument deduction succeeds. This marvelous little fix makes a bunch of Boost.Spirit tests start working. llvm-svn: 102601
* For template argument deduction from class template partialDouglas Gregor2010-04-291-51/+73
| | | | | | | specializations, separate out the deduction part from the checking and substitution of the deduced arguments. llvm-svn: 102600
* A not equal for an unordered relation should return true as specified in ↵Mon P Wang2010-04-292-3/+13
| | | | | | | | IEEE-754, e.g., NAN != NAN ? 1 : 0 should return 1. Also fix the case for complex. llvm-svn: 102598
* It turns out that we *can* end up having to display template argumentDouglas Gregor2010-04-292-2/+19
| | | | | | | | bindings when the template argument is still an expression; it happens while checking the template arguments of a class template partial specializations. Fixes PR6964. llvm-svn: 102595
OpenPOWER on IntegriCloud