summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-21/+21
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Use the new llvm::TinyPtrVector class, which implements exactly whatChris Lattner2011-07-181-73/+5
| | | | | | ShadowMapEntry was. llvm-svn: 135368
* Fix a bug where a local variable named 'self' is causingFariborz Jahanian2011-07-121-1/+6
| | | | | | | implicit ivar accesses to go through the 'self' variable rather than the real 'self' for the method. // rdar://9730771 llvm-svn: 134992
* Fix typo correction crash on overloaded functions, pr10283.Hans Wennborg2011-07-121-1/+2
| | | | | | | It would be cool if we could do overload resolution to suggest the right function, but at least this fixes the crashing. llvm-svn: 134976
* Initialize member.Benjamin Kramer2011-07-051-1/+2
| | | | llvm-svn: 134403
* When adding boolean keywords for typo correction, add either "bool" orDouglas Gregor2011-07-011-2/+4
| | | | | | | "_Bool" (depending on dialect), but not both, since they have the same edit distance from "Bool". llvm-svn: 134263
* Fix non-determinism in selecting between equal-length names which referChandler Carruth2011-06-281-1/+9
| | | | | | | | | | | | | to the same declaration when correcting typos. This is done by essentially sorting the corrections as they're added. Original patch by Kaelyn Uhrain, but modified for style and correctness by accounting for more than just the textual spelling. This still is a bit of a WIP hack to make this deterministic. Kaelyn (and myself) are working on a more principled solution going forward. llvm-svn: 134038
* Fix an invalid use of ::back() on an newly emptied vector. Also tightenChandler Carruth2011-06-281-2/+4
| | | | | | | | | | up several places where we never expect to have NULL pointers to assert early. This fixes a valgrind error within CorrectTypo, but not the non-determinism. llvm-svn: 134032
* Dynamically allocate the StringMaps used in typo correction so that weDouglas Gregor2011-06-281-12/+26
| | | | | | don't rely on the existence of a copy constructor. llvm-svn: 134009
* Add support for C++ namespace-aware typo correction, e.g., correctingDouglas Gregor2011-06-281-314/+537
| | | | | | | | | | | | | | | vector<int> to std::vector<int> Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes PR5776/<rdar://problem/8652971>. Thanks Kaelyn! llvm-svn: 134007
* Fix unused label warning.Jay Foad2011-06-241-2/+0
| | | | llvm-svn: 133790
* This patch started as an attempt to fix up the horrid namingAlexis Hunt2011-06-241-24/+36
| | | | | | | | | | | | conventions. I then discovered a typo in the using declaration bit in LookupSpecialMember. This led to discovering [namespace.udecl]p15, which clang implements incorrectly. Thus I've added a comment and implemented the code consistently with the rest of clang - that is incorrectly. And because I don't want to include tests of something incorrect, I've ripped the test out. llvm-svn: 133784
* Clean up the heart of the caching code and miss fewer edge cases.Alexis Hunt2011-06-231-8/+22
| | | | llvm-svn: 133671
* Fix a think-o that amazingly didn't show up until I started writingAlexis Hunt2011-06-221-1/+1
| | | | | | implicit move tests. llvm-svn: 133655
* Actually, you know, fix the problem.Alexis Hunt2011-06-221-1/+2
| | | | llvm-svn: 133604
* Avoid making assumption that this is either a CXXMethodDecl or aAlexis Hunt2011-06-221-2/+1
| | | | | | | | | FunctionTemplateDecl. I'm not quite sure what else it could be, though, and would appreciate some insight. This ought to fix the broken builds llvm-svn: 133600
* Attempt to reapply this patch for caching copy assignment operatorAlexis Hunt2011-06-211-5/+27
| | | | | | | lookup. Previously, it was breaking self-host, but it's been a week and a half and I can't reproduce, so I need to see if it's still failing. llvm-svn: 133581
* This change is breaking selfhost. Revert it until I have more timeAlexis Hunt2011-06-101-27/+5
| | | | | | to study it. llvm-svn: 132843
* Implement caching of copy assignment operator lookup.Alexis Hunt2011-06-101-5/+27
| | | | | | | | | | | | | I believe, upon, careful review, that this code causes us to incorrectly handle exception specifications of copy assignment operators in C++03 mode. However, we currently do not seem to properly implement the subtle distinction between copying of members and bases made by implicit copy constructors and assignment operators in C++03 - namely that they are limited in their overload selection - in all cases. As such, I feel that committing this code is correct pending a careful review of our implementation of these semantics. llvm-svn: 132841
* Implement caching for copy constructors in similar situations.Alexis Hunt2011-06-101-1/+17
| | | | llvm-svn: 132835
* Implement caching of default constructors on the resolution table. ThisAlexis Hunt2011-06-101-2/+123
| | | | | | | | isn't yet used for the less controlled environments of initialization. Also a few random text fixups. llvm-svn: 132833
* Catch the memory leak in a bucketAlexis Hunt2011-06-071-1/+2
| | | | llvm-svn: 132700
* Reimplement r132572 on top of a FoldingSet, thus hopefully solving bothAlexis Hunt2011-06-041-6/+55
| | | | | | the self-host failures and Chandler's concerns. llvm-svn: 132622
* Revert r132572 to figure out why it broke selfhost and clean it up asAlexis Hunt2011-06-031-50/+8
| | | | | | suggested by Chandler. llvm-svn: 132593
* Begin implementing a cache of special member lookups. Currently onlyAlexis Hunt2011-06-031-8/+50
| | | | | | | destructors are implemented but other special members are on the way, which is where the real benefits of this will be visible. llvm-svn: 132572
* Implement implicit deletion of default constructors.Alexis Hunt2011-05-111-3/+3
| | | | | | | | Yes, I'm aware that the diagnostics are awful. Tests to follow. llvm-svn: 131203
* Clean up trivial default constructors now.Alexis Hunt2011-05-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | hasTrivialDefaultConstructor() really really means it now. Also implement a fun standards bug regarding aggregates. Doug, if you'd like, I can un-implement that bug if you think it is truly a defect. The bug is that non-special-member constructors are never considered user-provided, so the following is an aggregate: struct foo { foo(int); }; It's kind of bad, but the solution isn't obvious - should struct foo { foo (int) = delete; }; be an aggregate or not? Lastly, add a missing initialization to FunctionDecl. llvm-svn: 131101
* Don't abuse reinterpret cast to do something the API of PointerUnionChandler Carruth2011-05-021-2/+2
| | | | | | | | | | | | provides proper support for. This was caught by -Wundefined-reinterpret-cast, and I think a reasonable case for it to warn on. Also use is<...> instead of dyn_cast<...> when the result isn't needed. This whole thing should probably switch to using UsuallyTinyPtrVector. llvm-svn: 130707
* Like the coding standards say, do not use "using namespace std".Jay Foad2011-04-231-3/+2
| | | | llvm-svn: 130054
* Add support for C++0x's range-based for loops, as specified by the C++11 ↵Richard Smith2011-04-141-1/+4
| | | | | | draft standard (N3291). llvm-svn: 129541
* From Vassil Vassilev: Give external source's last resort lookup a chance, ↵Axel Naumann2011-04-131-2/+2
| | | | | | even if an identifier could resolve to a builtin. llvm-svn: 129438
* Objective-C++: The global namespace is an associated namespace of anDouglas Gregor2011-04-121-1/+4
| | | | | | Objective-C pointer type. Fixes <rdar://problem/9142559>. llvm-svn: 129339
* Reinstate r127112, "Propagate new-style exception spec information to ↵Sebastian Redl2011-03-061-2/+1
| | | | | | ExtProtoInfo.", this time with the missing header. llvm-svn: 127118
* Revert r127112, "Propagate new-style exception spec information to ↵NAKAMURA Takumi2011-03-061-1/+2
| | | | | | | | ExtProtoInfo." It seems missing "clang/Basic/ExceptionSpecificationType.h". llvm-svn: 127115
* Propagate new-style exception spec information to ExtProtoInfo.Sebastian Redl2011-03-051-2/+1
| | | | llvm-svn: 127112
* Fixed LabelDecl source range and cleaned creation code.Abramo Bagnara2011-03-051-14/+19
| | | | llvm-svn: 127094
* Fixed source range for LabelDecl.Abramo Bagnara2011-03-031-1/+1
| | | | llvm-svn: 126952
* From Vassil Vassilev:Axel Naumann2011-02-241-1/+6
| | | | | | Add an interface for last resort, unqualified lookup. It can provide results for unqualified lookup when Sema fails to find anything itself. llvm-svn: 126387
* Use PointerUnion::getAddrOf instead of messing with PointerUnion & ↵Argyrios Kyrtzidis2011-02-191-3/+3
| | | | | | reinterpret_cast. llvm-svn: 126021
* fix rdar://9024687, a crash on invalid that we used to silently ignore.Chris Lattner2011-02-181-2/+3
| | | | llvm-svn: 125962
* implement basic support for __label__. I wouldn't be shocked if there areChris Lattner2011-02-181-4/+13
| | | | | | | | | bugs from other clients that don't expect to see a LabelDecl in a DeclStmt, but if so they should be easy to fix. This implements most of PR3429 and rdar://8287027 llvm-svn: 125817
* Switch labels over to using normal name lookup, instead of their Chris Lattner2011-02-181-7/+28
| | | | | | | own weird little DenseMap. Hey look, we now emit unused label warnings deterministically, amazing. llvm-svn: 125813
* When searching for visible declarations (e.g., for code completion),Douglas Gregor2011-02-161-0/+10
| | | | | | | be sure to look at all of the Objective-C class declarations within a @class. Fixes <rdar://problem/8876207>. llvm-svn: 125635
* Fix whitespace.NAKAMURA Takumi2011-01-271-228/+228
| | | | llvm-svn: 124364
* 7bit-ize.NAKAMURA Takumi2011-01-271-2/+2
| | | | llvm-svn: 124363
* Replace the representation of template template argument packDouglas Gregor2011-01-051-2/+3
| | | | | | | | | | | | | expansions with something that is easier to use correctly: a new template argment kind, rather than a bit on an existing kind. Update all of the switch statements that deal with template arguments, fixing a few latent bugs in the process. I"m happy with this representation, now. And, oh look! Template instantiation and deduction work for template template argument pack expansions. llvm-svn: 122896
* When we attempt to create a built-in that involves a library type weDouglas Gregor2011-01-031-5/+14
| | | | | | | | | don't have access to (e.g., fprintf, which needs the library type FILE), fail with a warning and forget about the builtin entirely. Previously, we would actually provide an error, which breaks autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316. llvm-svn: 122744
* Remove obsolete comments.Francois Pichet2011-01-021-7/+0
| | | | llvm-svn: 122686
* Restore r121752 without modification.John McCall2010-12-141-5/+6
| | | | llvm-svn: 121763
* Pull out r121752 in case it's causing the selfhost breakage.John McCall2010-12-141-6/+5
| | | | llvm-svn: 121759
OpenPOWER on IntegriCloud