summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* When we run into a constructor or destructor that is defined in theDouglas Gregor2011-11-012-5/+15
| | | | | | | | wrong class, make sure to drop it immediately; we don't want that constructor to be available within the DeclContext. Fixes <rdar://problem/9677163>. llvm-svn: 143506
* When we see an out-of-line definition of a member class template thatDouglas Gregor2011-11-011-1/+3
| | | | | | | does not match any declaration in the class (or class template), be sure to mark it as invalid. Fixes PR10924 / <rdar://problem/10119422>. llvm-svn: 143504
* Find copy constructor needed to copy an rvalue referenceFariborz Jahanian2011-11-011-1/+4
| | | | | | c++ object into block descriptor. // rdar://9971124 llvm-svn: 143475
* Silence a warning in -Asserts buildsMatt Beaumont-Gay2011-11-011-4/+2
| | | | llvm-svn: 143471
* Downgrade err_iboutlet_object_type to a warning. It was breaking a bunch of ↵Ted Kremenek2011-11-011-2/+2
| | | | | | code. We will reconsider promoting it back to an error later. llvm-svn: 143470
* Enable function call and some overload resolution with parameters of ↵Sebastian Redl2011-11-012-7/+41
| | | | | | aggregate class type and initializer list arguments. llvm-svn: 143462
* Fix the representation of wide strings in the AST and IR so that it uses the ↵Eli Friedman2011-11-011-1/+1
| | | | | | | | | | native representation of integers for the elements. This fixes a bunch of nastiness involving treating wide strings as a series of bytes. Patch by Seth Cantrell. llvm-svn: 143417
* Rework the AST for the initializer of a delegating constructor, soDouglas Gregor2011-11-012-20/+22
| | | | | | | | | that it retains source location information for the type. Aside from general goodness (being able to walk the types described in that information), we now have a proper representation for dependent delegating constructors. Fixes PR10457 (for real). llvm-svn: 143410
* Add missing lvalue-to-rvalue conversion.Eli Friedman2011-10-311-0/+6
| | | | llvm-svn: 143364
* Fixed FriendDecl source locations.Abramo Bagnara2011-10-292-4/+6
| | | | llvm-svn: 143295
* Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it willRichard Smith2011-10-296-8/+9
| | | | | | | | implicitly perform an lvalue-to-rvalue conversion if used on an lvalue expression. Also improve the documentation of Expr::Evaluate* to indicate which of them will accept expressions with side-effects. llvm-svn: 143263
* objc-arc: desugar certain type and improve on diagnostic forFariborz Jahanian2011-10-291-10/+20
| | | | | | | ownership qualifier cast which won't work. // rdar://10244607 llvm-svn: 143258
* [ARC] Do not transfer ARC ownership if the cast is going to result in r-value,Argyrios Kyrtzidis2011-10-281-3/+9
| | | | | | in which case the ownership is redundant. Thanks to John for the suggestion. llvm-svn: 143240
* objective-c arc: type-casting of an objc pointer toFariborz Jahanian2011-10-281-1/+18
| | | | | | | an rvalue retainable object type with life-time qualifier has no effect and wil be diagnosed as error. // rdar://10244607 llvm-svn: 143219
* Reflow code. No intended functionality change.Benjamin Kramer2011-10-281-17/+14
| | | | llvm-svn: 143192
* Add (hopefully) the last missing lvalue-to-rvalue conversion. Add an assertionRichard Smith2011-10-282-2/+27
| | | | | | to catch some future implicit lvalue-to-rvalue casts of inappropriate kinds. llvm-svn: 143182
* Be sure to build a dependent expression when we seeJohn McCall2011-10-281-12/+24
| | | | | | a binary operator involving a dependently-typed overload set. llvm-svn: 143172
* Fix for PR9751 to change the behavior of -Wformat warnings. If the formatRichard Trieu2011-10-281-117/+218
| | | | | | | | | | | string is part of the function call, then there is no difference. If the format string is not, the warning will point to the call site and a note will point to where the format string is. Fix-it hints for strings are moved to the note if a note is emitted. This will prevent changes to format strings that may be used in multiple places. llvm-svn: 143168
* Add missing lvalue-to-rvalue conversion to vector splat casts.Richard Smith2011-10-271-2/+6
| | | | llvm-svn: 143166
* Fix some cases where a CK_IntegralCast was being used to convert an lvalue to anRichard Smith2011-10-273-2/+18
| | | | | | | | | rvalue. An assertion to catch this is in ImpCastExprToType will follow, but vector operations currently trip over this (due to omitting the usual arithmetic conversions). Also add an assert to catch missing lvalue-to-rvalue conversions on the LHS of ->. llvm-svn: 143155
* objc: fix an ir-gen crash caused by recent Fariborz Jahanian2011-10-271-1/+1
| | | | | | property refactoring. // rdar://10327068 llvm-svn: 143139
* Make the loading of information attached to an IdentifierInfo from anDouglas Gregor2011-10-273-25/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. llvm-svn: 143100
* Make use of the parameter in Sema::ActOnObjCTemporaryExitContainerContext.Argyrios Kyrtzidis2011-10-271-1/+2
| | | | llvm-svn: 143088
* Fix crash on an @interface nested inside @implementation, rdar://10336158Argyrios Kyrtzidis2011-10-271-3/+3
| | | | llvm-svn: 143085
* For the "'@end' is missing in implementation context" point at the location ↵Argyrios Kyrtzidis2011-10-271-1/+1
| | | | | | of '@'. llvm-svn: 143084
* Do not warn when weak-import attribute is applied to enumFariborz Jahanian2011-10-261-1/+1
| | | | | | | decl. in Darwin due to certain projects requirement. // rdar://10277579 llvm-svn: 143082
* Pull out conversion on LHS of -> and . into its own function. This happensRichard Smith2011-10-262-42/+27
| | | | | | | implicitly in LookupMemberExpr and explicitly in cases where template instantiation doesn't redo the lookup. llvm-svn: 143046
* Compute the promoted integer type of fixed-width enums correctly. Found by ↵Eli Friedman2011-10-261-1/+5
| | | | | | inspection. llvm-svn: 143021
* Fix crash due to missing array-to-pointer decay when instantiating an unresolvedRichard Smith2011-10-261-3/+8
| | | | | | member expression. Refactoring to follow. llvm-svn: 143017
* UnresolvedMemberExprs need lvalue-to-rvalue conversions during templateRichard Smith2011-10-261-0/+7
| | | | | | instantiations too. llvm-svn: 143016
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-2512-411/+609
| | | | | | GCC compiler workaround. llvm-svn: 142931
* Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi2011-10-2511-267/+411
| | | | | | r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." llvm-svn: 142921
* Pull the pseudo-object stuff into its own file.John McCall2011-10-252-334/+24
| | | | | | | Tidy up some marginally related code just to annoy single-purpose-commit lovers. No functionality change. llvm-svn: 142915
* Introduce a placeholder type for "pseudo object"John McCall2011-10-2510-334/+500
| | | | | | | | | | | | | | | expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914
* Don't forget the lvalue-to-rvalue conversion on the LHS when instantiating aRichard Smith2011-10-251-0/+5
| | | | | | | dependent ->, where the member being referred to is an anonymous struct or union. This path was missed by the fix in r142890. llvm-svn: 142910
* Check for unexpanded parameter packs in the name that guards aDouglas Gregor2011-10-254-17/+55
| | | | | | | | | Microsoft __if_exists/__if_not_exists statement. Also note that we weren't traversing DeclarationNameInfo *at all* within the RecursiveASTVisitor, which would be rather fatal for variadic templates. llvm-svn: 142906
* Implement support for dependent Microsoft __if_exists/__if_not_existsDouglas Gregor2011-10-253-8/+118
| | | | | | | | | | statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different from the way Visual C++ implements them, because our parsed-template representation can't accommodate VC++ semantics without serious contortions. Hopefully this implementation is "good enough". llvm-svn: 142901
* Don't forget the lvalue-to-rvalue conversion on the LHS of an -> when rebuildingRichard Smith2011-10-251-0/+5
| | | | | | it during template instantiation, for a known RHS decl. llvm-svn: 142890
* Rework Microsoft __if_exists/__if_not_exists parsing and semanticDouglas Gregor2011-10-241-5/+25
| | | | | | | | | | | | | | | | | analysis to separate dependent names from non-dependent names. For dependent names, we'll behave differently from Visual C++: - For __if_exists/__if_not_exists at class scope, we'll just warn and then ignore them. - For __if_exists/__if_not_exists in statements, we'll treat the inner statement as a compound statement, which we only instantiate in templates where the dependent name (after instantiation) exists. This behavior is different from VC++, but it's as close as we can get without encroaching ridiculousness. The latter part (dependent statements) is not yet implemented. llvm-svn: 142864
* When we perform a lookup for a dependent name that is a member of anDouglas Gregor2011-10-241-1/+2
| | | | | | | | unknown specialization, treat this the same way as if the name were not found in the current instantiation. No actual functionality change, since apparently nothing depends on this. llvm-svn: 142862
* Minor refactoring of my last patch. Per Doug's suggestion.Fariborz Jahanian2011-10-241-1/+1
| | | | llvm-svn: 142807
* Rename AnalysisContext to AnalysisDeclContext. Not only is this name more ↵Ted Kremenek2011-10-241-4/+4
| | | | | | accurate, but it frees up the name AnalysisContext for other uses. llvm-svn: 142782
* Fix grammar for C++11 alignment specifiers, and add a few FIXMEs.Peter Collingbourne2011-10-231-0/+4
| | | | llvm-svn: 142760
* Diagnose unexpanded parameter packs in member initialisers (includingPeter Collingbourne2011-10-231-0/+9
| | | | | | in-class member initialisers). llvm-svn: 142758
* Clean up duplicated code in Sema::BuildMemInitializer.Peter Collingbourne2011-10-231-14/+3
| | | | llvm-svn: 142757
* Improve unexpanded parameter pack diagnostics by using UPPC_Initializer here.Peter Collingbourne2011-10-231-2/+3
| | | | llvm-svn: 142756
* Attach class template attributes to the templated CXXRecordDecl,Peter Collingbourne2011-10-231-1/+4
| | | | | | | | | instead of silently discarding them. As a side effect, this improves diagnostics for constexpr class templates slightly. llvm-svn: 142755
* [analyzer] Remove LocationContext creation methods from AnalysisManager, and ↵Ted Kremenek2011-10-231-1/+1
| | | | | | | | change clients to use AnalysisContext instead. WIP to remove/reduce ExprEngine's usage of AnalysisManager. llvm-svn: 142739
* Only emit implicit constant conversion truncation warnings in reachable ↵Ted Kremenek2011-10-221-3/+5
| | | | | | code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>. llvm-svn: 142716
* Fixes a minor hick up to my last patch.Fariborz Jahanian2011-10-221-2/+6
| | | | llvm-svn: 142711
OpenPOWER on IntegriCloud