summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Change all self assignments X=X to (void)X, so that we can turn on aJeffrey Yasskin2010-12-236-19/+19
| | | | | | | | | new gcc warning that complains on self-assignments and self-initializations. Fix one bug found by the warning, in which one clang::OverloadCandidate constructor failed to initialize its FunctionTemplate member. llvm-svn: 122459
* Be paranoid about NULL size expressions in dependently-sized array typesDouglas Gregor2010-12-221-3/+4
| | | | llvm-svn: 122454
* Unify the consistency checking for deduced template arguments into aDouglas Gregor2010-12-221-125/+212
| | | | | | | | | single routine. Extend that routine to handle consistency checking for template argument packs, so that we can compare the deduced packs for template parameter packs across different pack expansions. llvm-svn: 122452
* Subsequent attempt to fix linux build.Argyrios Kyrtzidis2010-12-223-1/+1
| | | | llvm-svn: 122442
* Implement template argument deduction for pack expansions whoseDouglas Gregor2010-12-225-42/+193
| | | | | | | | | | | pattern is a template argument, which involves repeatedly deducing template arguments using the pattern of the pack expansion, then bundling the resulting deductions into an argument pack. We can now handle a variety of simple list-handling metaprograms using variadic templates. See, e.g., the new "count" metaprogram. llvm-svn: 122439
* Apparently I'm on a mission to break as many builds as possible.Argyrios Kyrtzidis2010-12-222-3/+3
| | | | llvm-svn: 122436
* Forgot to move the files in CMakeLists.txt.Argyrios Kyrtzidis2010-12-222-3/+3
| | | | llvm-svn: 122433
* Add GR/Checkers subdir for CMake build.Argyrios Kyrtzidis2010-12-221-0/+1
| | | | llvm-svn: 122432
* Move AnalysisConsumer.cpp and ExprEngine.cpp into the Checkers subdir ↵Argyrios Kyrtzidis2010-12-222-0/+0
| | | | | | | | temporarily to avoid cyclic dependency between the libraries and fix the linux build. llvm-svn: 122431
* Complain on missing property getter method onlyFariborz Jahanian2010-12-223-9/+27
| | | | | | | if property-dot expression is decidedly an rvalue. // rdar://8155806. llvm-svn: 122430
* When performing template argument deduction where the argument is aDouglas Gregor2010-12-221-12/+15
| | | | | | | | | | dependent template specialization type, the number of template arguments need not match precisely. Rather than checking the number of arguments eagerly (which does not consider argument packs), let the deduction routine for template argument lists cope with too many/too few arguments. llvm-svn: 122425
* [analyzer] Refactoring: Drop the 'GR' prefix.Argyrios Kyrtzidis2010-12-2264-520/+520
| | | | llvm-svn: 122424
* [analyzer] Refactoring: Move stuff into namespace 'GR'.Argyrios Kyrtzidis2010-12-2285-93/+209
| | | | llvm-svn: 122423
* [analyzer] Refactoring: Move checkers into lib/GR/Checkers and their own ↵Argyrios Kyrtzidis2010-12-2255-51/+83
| | | | | | library, libclangGRCheckers llvm-svn: 122422
* [analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis2010-12-2289-6/+6
| | | | | | libclangGRCore llvm-svn: 122421
* [analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis2010-12-2281-221/+221
| | | | llvm-svn: 122420
* Implicitly expand argument packs when performing template argumentDouglas Gregor2010-12-221-33/+98
| | | | | | | | | | | | deduction. Unify all of the looping over template arguments for deduction purposes into a single place, where argument pack expansion occurs; this is also the hook for deducing from pack expansions, which itself is not yet implemented. For now, at least we can handle a basic "count" metafunction written with variadics. See the new test for the formulation that works. llvm-svn: 122418
* If the unary operator is prefix and an lvalue (in C++), bindZhongxing Xu2010-12-221-5/+10
| | | | | | the location (l-value) to it. llvm-svn: 122396
* Introduced raw_identifier token kind.Abramo Bagnara2010-12-2210-70/+83
| | | | llvm-svn: 122394
* The base type is not always pointer type. We may cast to a base reference.Zhongxing Xu2010-12-221-2/+8
| | | | llvm-svn: 122393
* Always blast through no-op casts when getting expr SVals.Zhongxing Xu2010-12-221-6/+1
| | | | llvm-svn: 122390
* After inlining the CXXConstructExpr, bind the temporary object region to it.Zhongxing Xu2010-12-222-11/+22
| | | | | | | | | | | This change is necessary when the variable is a const reference and we need the l-value of the construct expr. After that, when binding the variable, recover the lazy compound value when the variable is not a reference. In Environment, use the value of a no-op cast expression when it has one. Otherwise, blast-through it. llvm-svn: 122388
* Redesign the way anonymous fields are handled in designated-initializers.Francois Pichet2010-12-222-78/+31
| | | | | | Previously designated anonymous fields were found via name lookup. This redesign uses the fact that an IndirectFieldDecl declaration will always follow an anonymous implicit field to remove the special case of name lookup. llvm-svn: 122387
* Tweak the checking of class template partial specialization argumentsDouglas Gregor2010-12-211-4/+16
| | | | | | | | to cope with parameter packs. This is a band-aid I will be revisiting this section when I implement declaration matching semantics for variadic templates. llvm-svn: 122369
* Add a hack to work around the lack of proper type-source info in a pack ↵Douglas Gregor2010-12-211-1/+8
| | | | | | expansion TypeLoc llvm-svn: 122367
* Add some const qualifiersDouglas Gregor2010-12-211-2/+2
| | | | llvm-svn: 122365
* For member pointer conversions potentially involving derived-to-baseDouglas Gregor2010-12-211-2/+3
| | | | | | | | | conversions, make sure that the (possibly) derived type is complete before looking for base classes. Finishes the fix for PR8801. llvm-svn: 122363
* When searching for the instantiation of a locally-scoped tagDouglas Gregor2010-12-211-5/+15
| | | | | | | declaration, also look for an instantiation of its previous declarations. Fixes PR8801. llvm-svn: 122361
* In C++, if the user redeclares a builtin function with a type that isDouglas Gregor2010-12-212-0/+16
| | | | | | | | | | | | | | | inconsistent with the type that the builtin *should* have, forget about the builtin altogether: we don't want subsequence analyses, CodeGen, etc., to think that we have a proper builtin function. C is protected from errors here because it allows one to use a library builtin without having a declaration, and detects inconsistent (re-)declarations of builtins during declaration merging. C++ was unprotected, and therefore would crash. Fixes PR8839. llvm-svn: 122351
* Fix a major inconsistency in the representation of Objective-CDouglas Gregor2010-12-213-49/+11
| | | | | | | | | | | | | | | | | | | | classes, categories, protocols, and class extensions, where the methods and properties of these entities would be inserted into the DeclContext in an ordering that doesn't necessarily reflect source order. The culprits were Sema::ActOnMethodDeclaration(), which did not perform the insertion of the just-created method declaration into the DeclContext for these Objective-C entities, and Sema::ActOnAtEnd(), which inserted all method declarations at the *end* of the DeclContext. With this fix in hand, clean up the code-completion actions for property setters/getters that worked around this brokenness in the AST. Fixes <rdar://problem/8062781>, where this problem manifested as poor token-annotation information, but this would have struck again in many other places. llvm-svn: 122347
* Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.Michael J. Spencer2010-12-214-12/+17
| | | | llvm-svn: 122340
* Fix spelling.Michael J. Spencer2010-12-211-1/+1
| | | | llvm-svn: 122339
* Implement BlockDecl::getSourceRange(). The bogus source-rangeDouglas Gregor2010-12-211-0/+3
| | | | | | | information caused token-annotation to fail in funny ways. Fixes <rdar://problem/8595386>. llvm-svn: 122338
* A class template partial specialization cannot be a friend. Fixes PR8649.Douglas Gregor2010-12-211-0/+6
| | | | llvm-svn: 122325
* When checking a using declaration, make sure that the context we'reDouglas Gregor2010-12-211-0/+4
| | | | | | looking in is complete. Fixes PR8756. llvm-svn: 122323
* Don't try to compute the value of a value-dependent expression whenDouglas Gregor2010-12-211-0/+3
| | | | | | checking trivial comparisons. Fixes PR8795. llvm-svn: 122322
* Add IndirectField case in DeclContextPrinter::PrintDeclContext.Francois Pichet2010-12-211-0/+5
| | | | | | Fix PR8832. llvm-svn: 122311
* Implement instantiation of pack expansions whose pattern is a type-idDouglas Gregor2010-12-214-77/+145
| | | | | | in an exception specification. llvm-svn: 122297
* Fix the noreturn conversion to only strip off a single level of indirection.John McCall2010-12-213-60/+47
| | | | | | | Apply the noreturn attribute while creating a builtin function's type. Remove the getNoReturnType() API. llvm-svn: 122295
* Warn when message is sent to receiver ofFariborz Jahanian2010-12-214-13/+40
| | | | | | | | unknown type and there is a possibility that at runtime method is resolved to a deprecated or unavailable method. Addreses // rdar://8769853 llvm-svn: 122294
* Extend the parser to support pack expansions within exceptionDouglas Gregor2010-12-201-2/+13
| | | | | | | specifications. We can't yet instantiate them, however, since I tripped over PR8835. llvm-svn: 122292
* Further refactoring of the tree transformation for template argumentDouglas Gregor2010-12-201-42/+164
| | | | | | | | | | | | | lists, so that all such transformations go through a single, iterator-based transformation function. This is the only place where we need to implement the logic for transforming pack expansions whose pattern is a template argument. Unfortunately, the new cases this refactoring brings into the fold can't be meaningfully tested yet. We need template argument deduction to work well enough for variadic function templates first. llvm-svn: 122289
* Give the RecursiveASTVisitor a configuration functionDouglas Gregor2010-12-201-0/+2
| | | | | | | | | | | shouldWalkTypesOfTypeLocs() that determines whether it should walk the Types within TypeLocs. This walk is redundant, but perhaps required for some clients. Disabling this redundant walk in the unexpanded parameter pack finder produces better results, because we get parameter packs with source location info *unless* such source location information isn't available. llvm-svn: 122287
* Handle instantiation of template type parameter packs that occur asDouglas Gregor2010-12-201-2/+18
| | | | | | | the first qualifier in scope. We can't adequately test this test, unfortunately. llvm-svn: 122283
* Fix PR8639 by making the "argument unused during compilation" less ↵Rafael Espindola2010-12-202-22/+16
| | | | | | | | agressive. Now we don't warn if an argument is not used because it is shadowed by a subsequent argument. llvm-svn: 122281
* Clean up the printing of template argument packs; previously, we wereDouglas Gregor2010-12-201-7/+20
| | | | | | getting extra "<>" delimiters around template argument packs. llvm-svn: 122280
* Implement basic support for template instantiation of pack expansionsDouglas Gregor2010-12-206-34/+354
| | | | | | | | | | | | | | | | | whose patterns are template arguments. We can now instantiate, e.g., typedef tuple<pair<OuterTypes, InnerTypes>...> type; where OuterTypes and InnerTypes are template type parameter packs. There is a horrible inefficiency in TemplateArgumentLoc::getPackExpansionPattern(), where we need to create copies of TypeLoc data because our interfaces traffic in TypeSourceInfo pointers where they should traffic in TypeLocs instead. I've isolated in efficiency in this one routine; once we refactor our interfaces to traffic in TypeLocs, we can eliminate it. llvm-svn: 122278
* Rename 'VisitLocation' to 'visitLocation'.Ted Kremenek2010-12-204-13/+9
| | | | llvm-svn: 122271
* Rename 'Generate[Node,Sink]' to 'generate[Node,Sink]'.Ted Kremenek2010-12-2033-74/+74
| | | | llvm-svn: 122270
* Remove unused variableMatt Beaumont-Gay2010-12-201-2/+0
| | | | llvm-svn: 122257
OpenPOWER on IntegriCloud