summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Add some missing shiftsNate Begeman2010-06-141-5/+121
| | | | | | | | Fix multiplies by scalar Add SemaChecking code for all immediates Add SemaChecking-gen support to arm_neon.td llvm-svn: 105930
* TemplateSpecializationType's isCurrentInstantiation bit can be derivedJohn McCall2010-06-131-4/+1
| | | | | | from its canonical type. llvm-svn: 105912
* Most of NEON sema checking & fix to polynomial type detectionNate Begeman2010-06-131-16/+222
| | | | llvm-svn: 105908
* Added template parameters info for out-of-line definitions of class template ↵Abramo Bagnara2010-06-122-5/+39
| | | | | | methods. llvm-svn: 105882
* Don't omit class explicit instantiation from AST.Abramo Bagnara2010-06-121-50/+69
| | | | llvm-svn: 105880
* When deciding whether an expression has the boolean nature, don't look throughJohn McCall2010-06-121-3/+1
| | | | | | explicit casts. Fixes PR7359. llvm-svn: 105871
* Allow pseudo-destructors to be called on qualified pointers. Patch byJohn McCall2010-06-111-1/+1
| | | | | | Troy Straszheim! llvm-svn: 105823
* Conversions from Objective C object pointers to bool are "pointer conversionsJohn McCall2010-06-111-1/+3
| | | | | | to bool" in the sense of C++ [over.ics.rank]p4 bullet 1. I have decreed it. llvm-svn: 105817
* Fix the 64-bit build. operator<<(DiagnosticBuilder, long) doesn't exist, soJeffrey Yasskin2010-06-111-1/+1
| | | | | | | ptrdiff_t (long on 64-bit, apparently) is ambiguous between the int and unsigned int overloads. llvm-svn: 105816
* Add an option -fshow-overloads=best|all to limit the number of overloadJeffrey Yasskin2010-06-111-5/+20
| | | | | | | candidates printed. We default to 'all'. At the moment, 'best' prints only the first 4 overloads, but we'll improve that over time. llvm-svn: 105815
* Split DependentNameType into two types. DependentNameType represents theJohn McCall2010-06-115-134/+143
| | | | | | | | | | | | | | case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. llvm-svn: 105801
* Another chunk of the new RecursiveASTVisitor implementation: switch the returnChandler Carruth2010-06-101-1/+1
| | | | | | | value semantics such that we recurse while the visitors return true, and halt as soon as one returns false. Patch by csilvers. llvm-svn: 105787
* Commit my WIP on constexpr support. This commit: an XFAILed test and ↵Sebastian Redl2010-06-091-1/+6
| | | | | | treating constexpr as a top-level const. llvm-svn: 105752
* Fix two typos in comments.Sebastian Redl2010-06-091-1/+1
| | | | llvm-svn: 105751
* Added inherited info to template and non-type arguments of templates.Abramo Bagnara2010-06-092-10/+12
| | | | llvm-svn: 105716
* Major redesign of the RecursiveASTVisitor. This implements the majority of theChandler Carruth2010-06-091-14/+15
| | | | | | | | | | new design discussed on cfe-dev, with further steps in that direction to come. It is already much more complete than the previous visitor. Patch by Zhanyong and Craig with 80 column wraps and one missing declaration added by me. llvm-svn: 105709
* Added FixIt support to printf format string checking.Tom Care2010-06-091-5/+27
| | | | | | | | | | | | | | | | - Refactored LengthModifier to be a class. - Added toString methods in all member classes of FormatSpecifier. - FixIt suggestions keep user specified flags unless incorrect. Limitations: - The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation. A test/Sema/format-strings-fixit.c M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp llvm-svn: 105680
* Tweak our handling of the notion of a standard conversion sequenceDouglas Gregor2010-06-094-45/+14
| | | | | | | | | | | | | being a subsequence of another standard conversion sequence. Instead of requiring exact type equality for the second conversion step, require type *similarity*, which is type equality with cv-qualifiers removed at all levels. This appears to match the behavior of EDG and VC++ (albeit not GCC), and feels more intuitive. Big thanks to John for the line of reasoning that supports this change: since cv-qualifiers are orthogonal to the second conversion step, we should ignore them in the type comparison. llvm-svn: 105678
* Implement transpose/zip/unzip & table lookup.Nate Begeman2010-06-091-1/+22
| | | | | | Test out some basic constant-checking. llvm-svn: 105667
* When referring to a tag that was previously declared only as a friend, Douglas Gregor2010-06-081-1/+2
| | | | | | | build a new declaration for that tag type that will be visible for future lookups of that tag. llvm-svn: 105643
* A built-in overload candidate is consider a non-template function whenDouglas Gregor2010-06-081-1/+1
| | | | | | | determining whether one overload candidate is better than another. Fixes PR7319. llvm-svn: 105642
* Makefiles: Set Clang CPP compiler flags in a single location, instead of ↵Daniel Dunbar2010-06-081-2/+0
| | | | | | scattered throughout the project Makefiles. llvm-svn: 105638
* Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.Daniel Dunbar2010-06-081-2/+2
| | | | | | - This eliminates most dependencies on how Clang is installed relative to LLVM. llvm-svn: 105637
* Warn about comparisons between arrays and improve self-comparisonDouglas Gregor2010-06-081-11/+45
| | | | | | warnings, from Troy Straszheim! Fixes PR6163. llvm-svn: 105631
* Fixes a typo which prevented proper code gen. forFariborz Jahanian2010-06-081-2/+1
| | | | | | copy-in of c++ class objects into blocks. llvm-svn: 105622
* Implement a warning when converting the literal 'false' to aDouglas Gregor2010-06-081-1/+7
| | | | | | pointer. Original patch by Troy D. Straszheim; fixes PR7283. llvm-svn: 105621
* Since the enum values for each arch's builtins overlap, it is not ↵Nate Begeman2010-06-082-4/+36
| | | | | | appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules. llvm-svn: 105593
* Extend __builtin_shufflevector to expose the full power of the llvm ↵Nate Begeman2010-06-081-28/+38
| | | | | | shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation. llvm-svn: 105589
* When using property-dot assignment syntax to call a setter method,Fariborz Jahanian2010-06-071-2/+13
| | | | | | | type of rhs need be compared to setter's argument and not the getter type. Fixes radar 8062778 llvm-svn: 105560
* Use MaybeCreateCXXExprWithTemporaries for potential destruction ofFariborz Jahanian2010-06-073-3/+19
| | | | | | | created temporary. Use own initialized entity for copied in block variables. llvm-svn: 105533
* PR7245: Make binding a reference to a temporary without a usable copyJeffrey Yasskin2010-06-073-8/+16
| | | | | | constructor into an extension warning into the error that C++98 requires. llvm-svn: 105529
* Simplify the methods for creating a pointer, reference, member-pointer,John McCall2010-06-053-129/+98
| | | | | | | or block-pointer type by removing the qualifiers parameter. Introduce a method to perform semantic checking when adding qualifiers to a type. llvm-svn: 105526
* Added AccessSpecDecl node.Abramo Bagnara2010-06-054-0/+26
| | | | llvm-svn: 105525
* Add an extension to avoid an error when a global template has the same name asJeffrey Yasskin2010-06-051-2/+3
| | | | | | | | | | | | | | | | | | | | a member template, and you try to call the member template with an explicit template argument. See PR7247 For example, this downgrades the error to a warning in: template<typename T> struct set{}; struct Value { template<typename T> void set(T value) { } }; void foo() { Value v; v.set<double>(3.2); // Warning here. } llvm-svn: 105518
* Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.John McCall2010-06-049-57/+46
| | | | | | This is never null, but the associated type might be. llvm-svn: 105503
* When deciding whether reinterpret_cast casts away constness we need to look ↵Anders Carlsson2010-06-041-2/+7
| | | | | | at array qualifiers. Fixes rdar://problem/8018292. llvm-svn: 105494
* Build AST for copy-construction of copied-inFariborz Jahanian2010-06-041-2/+22
| | | | | | class object in blocks and carry it to IRGen. llvm-svn: 105487
* Remember type source information for Objective C property declarations.John McCall2010-06-042-9/+11
| | | | llvm-svn: 105484
* Preserve more information from a block's original function declarator, if oneJohn McCall2010-06-043-34/+67
| | | | | | | was given. Remove some unnecessary accounting from BlockScopeInfo. Handle typedef'ed function types until such time as we decide not. llvm-svn: 105478
* Restructure how we interpret block-literal declarators. Correctly handleJohn McCall2010-06-043-79/+80
| | | | | | | the case where we pick up block arguments from a typedef. Save the block signature as it was written, and preserve same through PCH. llvm-svn: 105466
* Don't insert in lexical context implicit definitions of static member instances.Abramo Bagnara2010-06-041-1/+2
| | | | llvm-svn: 105465
* When checking for equality of template parameter lists, a templateDouglas Gregor2010-06-041-3/+26
| | | | | | type parameter pack is distinct from a template type parameter. llvm-svn: 105464
* Delay checking for mutable const fields until we're checking the field.John McCall2010-06-042-30/+28
| | | | | | | Allows this check to work properly for instantiated fields and removes an unnecessary GetTypeForDeclarator call. llvm-svn: 105463
* More refactoring.John McCall2010-06-042-27/+36
| | | | llvm-svn: 105458
* Remove a couple of unnecessary uses of IsStandardConversion.John McCall2010-06-041-17/+6
| | | | llvm-svn: 105445
* Make sure to check the accessibility of and mark the destructor for theEli Friedman2010-06-031-3/+20
| | | | | | operand of a throw expression. Fixes PR7281. llvm-svn: 105408
* Add all final overriders to the map.Anders Carlsson2010-06-031-0/+7
| | | | llvm-svn: 105374
* Fix unintentional method call due to false -> pointer conversion; patch by ↵Daniel Dunbar2010-06-021-1/+1
| | | | | | Dimitry Andric! llvm-svn: 105327
* typeid() produces type information for the cv-unqualified version ofDouglas Gregor2010-06-021-4/+9
| | | | | | the type. Thanks to Anders for the bug report! llvm-svn: 105314
* Alter the ExternalASTSource interface to permit by-name lookups. PCH ↵John McCall2010-06-012-6/+10
| | | | | | | | | | | | | | continues to bring in the entire lookup table at once. Also, give ExternalSemaSource's vtable a home. This is important because otherwise any reference to it will cause RTTI to be emitted, and since clang is compiled with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's RTTI). So this change makes it possible to subclass ExternalSemaSource from projects compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti. llvm-svn: 105268
OpenPOWER on IntegriCloud