summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't leak the TBAA object.Dan Gohman2010-10-151-0/+1
| | | | llvm-svn: 116595
* Add a comment about odd "signed char" incompatibility between C++ and C.Dan Gohman2010-10-151-1/+5
| | | | llvm-svn: 116593
* When performing typo correction, keep track of whether the last lookupDouglas Gregor2010-10-151-1/+37
| | | | | | | | | we did was an acceptable lookup. If it is, then we can re-use that lookup result. If it isn't, we have to perform the lookup again. This is almost surely the cause behind the mysterious typo.m failures on some builders; we were getting the wrong lookup results returned. llvm-svn: 116586
* When we're in the context of an Objective-C message send's receiver,Douglas Gregor2010-10-151-1/+13
| | | | | | | typo correction prefers "super" over other, equivalent completions. I believe this will fix the regression on the buildbot. llvm-svn: 116574
* Diagnose C++ [class.mem]p13-14, where a class member has the same nameDouglas Gregor2010-10-152-1/+50
| | | | | | as the class itself. Fixes PR7082. llvm-svn: 116573
* fix http://llvm.org/PR8371 in the straightforward way, also adding a commentGabor Greif2010-10-151-0/+1
| | | | llvm-svn: 116570
* Treat __extension__ like ParenExpr.Abramo Bagnara2010-10-151-14/+48
| | | | llvm-svn: 116569
* Death to blocks, or at least the word "block" in one particular obnoxiouslyJohn McCall2010-10-1513-57/+55
| | | | | | ambiguous context. llvm-svn: 116567
* Don't complain about a variable within a linkage-specification that isDouglas Gregor2010-10-151-1/+1
| | | | | | initialized. Fixes PR7076. llvm-svn: 116553
* When we are missing the ',' or '>' to terminate a template parameterDouglas Gregor2010-10-151-1/+1
| | | | | | list, complain about it! Fixes PR7053. llvm-svn: 116551
* Add builtin conditional operator candidates for scoped enumerationDouglas Gregor2010-10-151-3/+12
| | | | | | types, from Alp Toker! Fixes PR8344. llvm-svn: 116549
* Update CMake.Daniel Dunbar2010-10-151-0/+1
| | | | llvm-svn: 116548
* Add a TBAA type for pointer types.Dan Gohman2010-10-151-0/+4
| | | | llvm-svn: 116544
* Unsigned types are TBAA-compatible with their signed counterparts.Dan Gohman2010-10-141-4/+18
| | | | | | Also, handle unknown types conservatively. llvm-svn: 116541
* Rewrite bug fix rewriting a property assignment whenFariborz Jahanian2010-10-141-0/+6
| | | | | | its RHS is an ivar. Fixes //rdar: //8541517. llvm-svn: 116539
* Experimental TBAA support.Dan Gohman2010-10-147-10/+191
| | | | | | | This enables metadata generation by default, however the TBAA pass in the optimizer is still disabled for now. llvm-svn: 116536
* Use root non-virtual primary base class, not just immediate primary base ↵Devang Patel2010-10-141-1/+11
| | | | | | | | class, for AT_containing_type. This is tested by virtfunc.exp in gdb testsuite. llvm-svn: 116535
* Wire up the -fstrict-aliasing and -fno-strict-aliasing optionsDan Gohman2010-10-142-0/+5
| | | | | | to CodeGenOption flags. llvm-svn: 116530
* template-ids are looked up differently in friend declarations.John McCall2010-10-141-1/+6
| | | | llvm-svn: 116529
* When performing typo correction, look through the set of knownDouglas Gregor2010-10-144-10/+116
| | | | | | | | | | | | | | | | | | | | identifiers to determine good typo-correction candidates. Once we've identified those candidates, we perform name lookup on each of them and the consider the results. This optimization makes typo correction > 2x faster on a benchmark example using a single typo (NSstring) in a tiny file that includes Cocoa.h from a precompiled header, since we are deserializing far less information now during typo correction. There is a semantic change here, which is interesting. The presence of a similarly-named entity that is not visible can now affect typo correction. This is both good (you won't get weird corrections if the thing you wanted isn't in scope) and bad (you won't get good corrections if there is a similarly-named-but-completely-unrelated thing). Time will tell whether it was a good choice or not. llvm-svn: 116528
* Make sure that we diagnose invalid qualifiers on friend functions.Douglas Gregor2010-10-141-6/+9
| | | | llvm-svn: 116527
* At Fariborz's request, a somewhat cleaner bit-combining hack.John McCall2010-10-142-16/+16
| | | | llvm-svn: 116524
* Put line number on the diagnostic. //rdar: //8550657.Fariborz Jahanian2010-10-141-1/+1
| | | | llvm-svn: 116519
* Tweak the typo-correction implementation to determine correctionsDouglas Gregor2010-10-141-147/+109
| | | | | | | | | | | | | | | | | | | | | solely based on the names it sees, rather than actual declarations it gets. In essence, we determine the set of names that are "close enough" to the typo'd name. Then, we perform name lookup for each of those names, filtering out those that aren't actually visible, and typo-correct from the remaining results. Overall, there isn't much of a change in the behavior of typo correction here. The only test-suite change comes from the fact that we make good on our promise to require that the user type 3 characters for each 1 character corrected. The real intent behind this change is to set the stage for an optimization to typo correction (so that we don't need to deserialize all declarations in a translation unit) and future work in finding missing qualification ("'vector' isn't in scope; did you mean 'std::vector'?). Plus, the code is cleaner this way. llvm-svn: 116511
* Store in PCH the key function of C++ class to avoid deserializing the ↵Argyrios Kyrtzidis2010-10-143-3/+14
| | | | | | | | complete declaration context in order to compute it. Progress for rdar://7260160. llvm-svn: 116508
* Allow deserialization of just the fields of a record, when we want to ↵Argyrios Kyrtzidis2010-10-144-29/+81
| | | | | | | | | | | | | iterate over them, instead of deserializing the complete declaration context of the record. Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods. Fix this by allow deserialization of just the fields when we want to iterate over them. Progress for rdar://7260160. llvm-svn: 116507
* Give a default implementation for ASTDeserializationListener's methods, no ↵Argyrios Kyrtzidis2010-10-142-14/+4
| | | | | | functionality change. llvm-svn: 116506
* Introduce command line option -error-on-deserialized-decl that is ↵Argyrios Kyrtzidis2010-10-142-0/+45
| | | | | | | | | | accompanied by a name and emits an error if a declaration with this name is deserialized from PCH. This is for testing, to make sure that we don't deserialize stuff needlessly. llvm-svn: 116505
* Don't add the injected class name to the redeclarations chain; the chain ↵Argyrios Kyrtzidis2010-10-141-1/+3
| | | | | | | | should contain actual redeclarations, not implicits. As a bonus, now we don't deserialize it unless we need it. llvm-svn: 116504
* Introduce command line option -dump-deserialized-decls which is used to ↵Argyrios Kyrtzidis2010-10-142-2/+38
| | | | | | print the PCH decls that got deserialized, for testing purposes. llvm-svn: 116503
* Eliminate usage of ObjCSuperExpr used forFariborz Jahanian2010-10-1420-112/+191
| | | | | | | 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 llvm-svn: 116483
* support for AltiVec extensions from the Cell architectureAnton Yartsev2010-10-141-0/+1402
| | | | llvm-svn: 116478
* Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.Zhongxing Xu2010-10-141-1/+8
| | | | llvm-svn: 116473
* Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, andJohn McCall2010-10-141-6/+4
| | | | | | ObjCObjectType into Type. llvm-svn: 116472
* Whoops. This really shouldn't compile in clang, either.John McCall2010-10-141-2/+2
| | | | llvm-svn: 116470
* Perform range restrictions on regparm when applied to a type andJohn McCall2010-10-141-0/+14
| | | | | | not a decl. llvm-svn: 116469
* Teach Diagnostic to recursively expand inside %plural formats.John McCall2010-10-141-5/+11
| | | | llvm-svn: 116468
* allow I128 suffixes in msextensions mode just like i128 suffixes, patchChris Lattner2010-10-141-1/+1
| | | | | | by Martin Vejnar! llvm-svn: 116460
* move logic for computing signed integer overflow when constant foldingChris Lattner2010-10-131-27/+22
| | | | | | into APInt. llvm-svn: 116453
* Diagnose when a 'static' member function overrides a virtual functionDouglas Gregor2010-10-131-6/+24
| | | | | | in a base class. Fixes PR8168. llvm-svn: 116448
* Generalize the checking for qualification of (non-friend) classDouglas Gregor2010-10-132-17/+45
| | | | | | | | members. Provide a hard error when the qualification doesn't match the current class type, or a warning + Fix-it if it does match the current class type. Fixes PR8159. llvm-svn: 116445
* Eliminate the use of ObjCSuperExpr in code completion.Douglas Gregor2010-10-131-11/+9
| | | | llvm-svn: 116436
* There is no reason for dereferencing a pointer-to-member to requireDouglas Gregor2010-10-131-2/+5
| | | | | | | | | that the class type into which the pointer points be complete, even though the standard requires it. GCC/EDG do not require a complete type here, so we're calling this a problem with the standard. Fixes PR8328. llvm-svn: 116429
* _Bool is not a keyword in C++. Fixes PR7388 and PR8349.Douglas Gregor2010-10-131-2/+2
| | | | llvm-svn: 116422
* Introduce a bit into Type that keeps track of whether there are anyDouglas Gregor2010-10-132-32/+66
| | | | | | | | | | | unnamed or local types within that type. This bit is cached along with the linkage of a type, so that it can be recomputed (e.g., when we see that a typedef has given a name to an anonymous declaration). Use this bit when checking C++03 [temp.arg.type]p2, so that we don't walk template argument types repeatedly. llvm-svn: 116413
* Fix a silly bug in the suppression of non-error diagnostics in aDouglas Gregor2010-10-132-3/+9
| | | | | | | SFINAE context, where we weren't getting the right diagnostic argument count. I blame DiagnosticBuilder's weirdness. Fixes PR8372. llvm-svn: 116411
* Compute whether a type is variably modified as we build the type,Douglas Gregor2010-10-131-44/+49
| | | | | | | rather than walking the type's structure every time we request this information. Performance optimization; no functionality change. llvm-svn: 116409
* Eliminates a clang warning.Fariborz Jahanian2010-10-131-0/+1
| | | | llvm-svn: 116408
* Preserve the original scope when picking the right scope for a friendJohn McCall2010-10-131-2/+3
| | | | | | declaration, because we'll need it later. Hopefully fixed self-host. llvm-svn: 116399
* Support friend function declarations in local classes correctly.John McCall2010-10-132-51/+87
| | | | | | | | Fixes a crash and diagnoses the error condition of an unqualified friend which doesn't resolve to something. I'm still not certain how this is useful. llvm-svn: 116393
OpenPOWER on IntegriCloud