- Jan 15, 2012
-
-
Chandler Carruth authored
re-computed rather than the variables be re-used just after the assert. Just use the variables since we have them already. Fixes an unused variable warning. Also fix an 80-column violation. llvm-svn: 148212
-
Richard Smith authored
Don't consider decltype(e) for an instantiation-dependent, but not type-dependent, e to be non-type-dependent but canonical(!). llvm-svn: 148210
-
Richard Smith authored
not integer constant expressions. In passing, fix the 'folding is an extension' diagnostic to not claim we're accepting the code, since that's not true in -pedantic-errors mode, and add this diagnostic to -Wgnu. llvm-svn: 148209
-
Richard Smith authored
designator invalid. (Since we can't read the value of such a pointer, this only affects the quality of diagnostics.) llvm-svn: 148208
-
Eli Friedman authored
Change linkage computation so it doesn't depend on FunctionDecl::isExternC or VarDecl::isExternC, and instead queries what it actually cares about: whether the given declaration is inside an extern "C" context. Fundamentally, figuring out whether a function/variable uses C linkage requires knowing the linkage, and the logic in FunctionDecl::isExternC and VarDecl::isExternC was getting it wrong. Given that, fix FunctionDecl::isExternC and VarDecl::isExternC to use much simpler implementations that depend on the fixed linkage computation. Fixes a regression to test/SemaCXX/linkage.cpp caused by a new warning exposing the fact that the internal state was wrong. llvm-svn: 148207
-
- Jan 14, 2012
-
-
Benjamin Kramer authored
Shrinks OverloadCandidate from 208 to 168 bytes. llvm-svn: 148204
-
Benjamin Kramer authored
llvm-svn: 148200
-
Benjamin Kramer authored
Give OverloadCandidateSet the responsibility for destroying the implicit conversion sequences so we don't get double frees when the vector reallocates. llvm-svn: 148198
-
Fariborz Jahanian authored
llvm-svn: 148197
-
Benjamin Kramer authored
llvm-svn: 148193
-
Benjamin Kramer authored
llvm-svn: 148192
-
Benjamin Kramer authored
llvm-svn: 148190
-
Douglas Gregor authored
llvm-svn: 148188
-
Douglas Gregor authored
we have a redeclarable type, and only use the new virtual versions (getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have that type information. This keeps us from penalizing users with strict type information (and is the moral equivalent of a "final" method). Plus, settle on the names getPreviousDecl() and getMostRecentDecl() throughout. llvm-svn: 148187
-
Benjamin Kramer authored
To avoid malloc thrashing give OverloadCandidateSet an inline capacity for conversion sequences. We use the fact that OverloadCandidates never outlive the OverloadCandidateSet and have a fixed amount of conversion sequences. This eliminates the oversized SmallVector from OverloadCandidate shrinking it from 752 to 208 bytes. On the test case from the "Why is CLANG++ so freaking slow" thread on llvmdev this avoids one gig of vector reallocation (including memcpy) which translates into 5-10% speedup on Lion/x86_64. Overload candidate computation is still the biggest malloc contributor when compiling templated c++ code. llvm-svn: 148186
-
Benjamin Kramer authored
Replace push_back with addCandidate which will let us make use of the fixed size of the conversion sequence vector soon. llvm-svn: 148185
-
Douglas Gregor authored
virtual functions that provide previous/most recent redeclaration information for any declaration. Use this to eliminate the redundant, less efficient getPreviousDecl() functions. llvm-svn: 148184
-
Douglas Gregor authored
llvm-svn: 148183
-
Douglas Gregor authored
Add a FIXME for mutation of the common pointer of a RedeclarableTemplateDecl. It is not clear that it's worth delaying the allocation of said pointer llvm-svn: 148182
-
Douglas Gregor authored
Redeclarable<RedeclarableTemplateDecl>, eliminating a bunch of redeclaration-chain logic both in RedeclarableTemplateDecl and especially in its (de-)serialization. As part of this, eliminate the RedeclarableTemplate<> class template, which was an abstraction that didn't actually save anything. llvm-svn: 148181
-
Zhongxing Xu authored
llvm-svn: 148179
-
Richard Smith authored
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted as constants. Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other entrypoints dealing with constant member pointers are no longer necessary and will be removed in a later change. Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to VarDecl::evaluateValue. This performs caching and deals with the nasty cases in C++11 where a non-const object's initializer can refer indirectly to previously-initialized fields within the same object. Building the intermediate APValue object incurs a measurable performance hit on pathological testcases with huge initializer lists, so we continue to build IR directly from the Expr nodes for array and record types outside of C++11. llvm-svn: 148178
-
Anna Zaks authored
data. llvm-svn: 148176
-
Argyrios Kyrtzidis authored
index parameters. llvm-svn: 148169
-
Rafael Espindola authored
With that, centralize the way we merge visibility, always preferring explicit over implicit and then picking the most restrictive one. Fixes pr10113 and pr11690. llvm-svn: 148163
-
Chad Rosier authored
llvm-svn: 148162
-
Argyrios Kyrtzidis authored
that one wants indexing callbacks for function-local symbols as well. llvm-svn: 148160
-
Douglas Gregor authored
get added to the identifier chains as part of deserialization, because they should not be visible to name lookup. llvm-svn: 148159
-
Eli Friedman authored
Progress towards making isUsed() reflect whether a declaration is odr-used; don't set isUsed for local variables which are referenced in unevaluated contexts. Make other code use isReferenced() (which basically indicates that a declaration isn't dead) where appropriate. I was forced to change test/SemaCXX/linkage.cpp because we aren't actually modeling extern "C" in the AST the way that testcase expects; we were not printing a warning only because we skipped the relevant check. Someone who actually understands the semantics here should fix that. llvm-svn: 148158
-
-
Kaelyn Uhrain authored
The change to SemaTemplateVariadic.cpp improves the typo correction results in certain situations, while the change to SemaTemplate.cpp does not change existing behavior. llvm-svn: 148155
-
Douglas Gregor authored
multiple name lookup results in C/Objective-C. Fixes a regression a caused in r147533, found by Enea Zaffanella! llvm-svn: 148154
-
- Jan 13, 2012
-
-
Douglas Gregor authored
framework is actually a subframework within a top-level framework. If so, only infer a module for the top-level framework and then dig out the appropriate submodule. This helps us cope with an amusing subframeworks anti-pattern, where one uses -F <framework>/Frameworks to get direct include access to the subframeworks of a framework (which otherwise would not be permitted). llvm-svn: 148148
-
Anna Zaks authored
memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic could be reused in the analyzer. llvm-svn: 148142
-
Eli Friedman authored
llvm-svn: 148141
-
Kaelyn Uhrain authored
improving the typo correction results in certain situations. This is also the first typo correction callback conversion to affect an existing unit test. :) llvm-svn: 148140
-
Sebastian Pop authored
Patch from Jyotsna Verma: I have made the changes to remove assertions in the Hexagon backend specific clang driver. Instead of asserting on invalid arch name, it has been modified to use the default value. I have changed the implementation of the CPU flag validation for the Hexagon backend. Earlier, the clang driver performed the check and asserted on invalid inputs. In the new implementation, the driver passes the last CPU flag (or sets to "v4" if not specified) to the compiler (and also to the assembler and linker which perform their own check) instead of asserting on incorrect values. This patch changes the setCPU function for the Hexagon backend in clang/lib/Basic/Targets.cpp which causes the compiler to error out on incorrect CPU flag values. llvm-svn: 148139
-
Sebastian Pop authored
llvm-svn: 148138
-
Sebastian Pop authored
llvm-svn: 148137
-
Richard Smith authored
llvm-svn: 148135
-