aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
AgeCommit message (Collapse)AuthorFilesLines
2012-12-01Consistently use 'needsImplicit<special member>' to determine whether we needRichard Smith3-20/+21
an implicit special member, rather than sometimes using '!hasDeclared<special member>'. No functionality change. llvm-svn: 169075
2012-12-01Try to make the source location information for token pastes a bit more ↵Eli Friedman1-0/+6
consistent. Fixes a crash printing diagnostics on the gcc testsuite, and also makes diagnostic range printing print nicer results for token pastes. llvm-svn: 169068
2012-12-01Remove restriction on combining ubsan with asan or tsan. This has worked for ↵Richard Smith1-5/+4
a while. llvm-svn: 169066
2012-12-01Fix the determination of whether a capture refers to an enclosingDouglas Gregor1-3/+4
scope when dealing with nested blocks. Fixes <rdar://problem/12778708>. llvm-svn: 169065
2012-11-30Don't emit a warning with an input/output parameter. We assume the user ↵Bill Wendling1-1/+3
knows what they're doing here. llvm-svn: 169059
2012-11-30Teach the serialized diagnostic writer to clone() itself, sharingDouglas Gregor1-67/+112
state so that all of the various clones end up rendering their diagnostics into the same serialized-diagnostics file. This is important when we actually want failures during module build to be reported back to the translation unit that tried to import the not-yet-built or out-of-date module. <rdar://problem/12565727> llvm-svn: 169057
2012-11-30Don't warn if the input size is less than the register size. Also don't warn ifBill Wendling1-1/+3
the output size is greater than the register size. No truncation occurs with those. Reword warning to make it clearer what's the problem is. llvm-svn: 169054
2012-11-30Make -Wtautological-constant-out-of-range-compare behave sanely for enums ↵Eli Friedman1-4/+3
with a signed fixed type. <rdar://problem/12780159>. llvm-svn: 169051
2012-11-30Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!Douglas Gregor2-16/+16
llvm-svn: 169045
2012-11-30When we're emitting a diagnostic with a source location in an importedDouglas Gregor3-8/+103
module, provide a module import stack similar to what we would get for an include stack, e.g., In module 'DependsOnModule' imported from build-fail-notes.m:4: In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1: Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here @interface Module <rdar://problem/12696425> llvm-svn: 169042
2012-11-30Fixing a precedence issue with my previous commit.Aaron Ballman1-1/+1
llvm-svn: 169041
2012-11-30Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types ↵Aaron Ballman1-1/+1
in a logical operator. llvm-svn: 169037
2012-11-30Comments: no need to escape any characters in \code ... \endcode.Dmitri Gribenko1-6/+6
llvm-svn: 169030
2012-11-30Support for #pragma region/endregion for MSVC compatibility. Patch thanks ↵Aaron Ballman1-0/+25
to pravic! llvm-svn: 169028
2012-11-30Actually keep track of the source locations at which particular moduleDouglas Gregor2-6/+11
files are loaded. llvm-svn: 169027
2012-11-30When an error occurs while building a module on demand, provide "WhileDouglas Gregor3-15/+68
building module 'Foo' imported from..." notes (the same we we provide "In file included from..." notes) in the diagnostic, so that we know how this module got included in the first place. This is part of <rdar://problem/12696425>. llvm-svn: 169021
2012-11-30Allow matchers to access the ASTContext.Manuel Klimek1-0/+3
Patch by Edwin Vane. llvm-svn: 169000
2012-11-30Fix the computation of highlight ranges so we produce something sane whenEli Friedman1-10/+30
the beginning and end of the range are in different macro arguments. PR14399. llvm-svn: 168984
2012-11-30Refactor to reduce duplication in handling of special member functions. No ↵Richard Smith4-210/+94
functionality change. llvm-svn: 168977
2012-11-29Keep track of modules that have failed to build. If we encounter anDouglas Gregor2-19/+63
import of that module elsewhere, don't try to build the module again: it won't work, and the experience is quite dreadful. We track this information somewhat globally, shared among all of the related CompilerInvocations used to build modules on-the-fly, so that a particular Clang instance will only try to build a given module once. Fixes <rdar://problem/12552849>. llvm-svn: 168961
2012-11-29Fix a small calling-convention bug for x86-32. PR14453.Eli Friedman1-2/+8
llvm-svn: 168959
2012-11-29Add ARM cortex-a5 subtargetQuentin Colombet2-3/+3
llvm-svn: 168958
2012-11-29Revert commit revision r168953, to change the commit message, which was emptyQuentin Colombet2-3/+3
llvm-svn: 168956
2012-11-29(no commit message)Quentin Colombet2-3/+3
llvm-svn: 168953
2012-11-29This patch exposes to Clang users three more sanitizers are experimental ↵Alexey Samsonov3-10/+33
features of ASan: 1) init-order sanitizer: initialization-order checker. Status: usable, but may produce false positives w/o proper blacklisting. 2) use-after-return sanitizer Status: implemented, but heavily understed. Should be optional, as it significanlty slows program down. 3) use-after-scope sanitizer Status: in progress. llvm-svn: 168950
2012-11-29Make sure that we put the rest of the sanitizer libraries on the link lineEric Christopher1-7/+5
before libstdc++ like we do with ubsan. llvm-svn: 168918
2012-11-29Now that the underlying problem has been fixed, add r168411 back.Rafael Espindola1-6/+4
Original commit message: Remove redundant code. llvm-svn: 168900
2012-11-29Merge function types in C.Rafael Espindola4-10/+24
Among other differences, GCC accepts typedef int IA[]; typedef int A10[10]; static A10 *f(void); static IA *f(void); void g(void) { (void)sizeof(*f()); } but clang used to reject it with: invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []') The intention of c99's 6.2.7 seems to be that we should use the composite type and accept as gcc does. Doing the type merging required some extra fixes: * Use the type from the function type in initializations, even if an parameter is available. * Fix the merging of the noreturn attribute in function types. * Make CodeGen handle the fact that an parameter type can be different from the corresponding type in the function type. llvm-svn: 168895
2012-11-29[-cxx-abi microsoft] Also spill the argument-back-references context when ↵Timur Iskhodzhanov1-3/+7
mangling templates llvm-svn: 168862
2012-11-29Reject uses of __int128 on platforms that don't support it. Also move the uglyRichard Smith4-3/+11
'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be properly cleaned up. llvm-svn: 168856
2012-11-29Fix sentence construction-o.Nico Weber1-1/+1
llvm-svn: 168855
2012-11-29Fix crash-on-invalid. <rdar://problem/12765391>.Eli Friedman1-4/+3
llvm-svn: 168851
2012-11-29The declaration of a special member can require overload resolution to beRichard Smith1-0/+54
performed, to determine whether that special member is deleted or constexpr. That overload resolution process can in turn trigger the instantiation of a template, which can do anything, including triggering the declaration of that very same special member function. When this happens, do not try to recursively declare the special member -- that's impossible. Instead, only try to realise the truth. There is no special member. llvm-svn: 168847
2012-11-29Correctly handle IntegralToBool casts in C++ in the static analyzer. Fixes ↵Ted Kremenek1-2/+8
<rdar://problem/12759044>. llvm-svn: 168843
2012-11-29[driver] -mkernel implies -mstrict-align; don't add the redundant option.Chad Rosier1-1/+2
rdar://12771737 llvm-svn: 168841
2012-11-28Implement C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq ↵Michael Han1-1/+35
appertains to a friend declaration, that declaration shall be a definition. llvm-svn: 168826
2012-11-28objective-C blocks: Make sure that identical logic is usedFariborz Jahanian6-84/+43
in deciding a copy/dispose field is needed in a byref structure and when generating the copy/dispose helpers. In certain cases, these fields were being added but no copy/dispose was being generated. This was uncovered in ARC, but not in MRR. // rdar://12759433 llvm-svn: 168825
2012-11-28Per C++11 [except.spec]p2, rvalue references are not permitted in exception ↵Richard Smith1-33/+34
specifications. llvm-svn: 168824
2012-11-28PR14388: An array or function type in an exception specification should beRichard Smith1-12/+23
decayed to a pointer type. Patch by WenHan Gu, with a little tweaking and additional testcases by me. llvm-svn: 168822
2012-11-28ABI: comments from Eli on r168820.Manman Ren1-0/+2
rdar://12723368 llvm-svn: 168821
2012-11-28ABI: modify CreateCoercedLoad and CreateCoercedStore to not use load or store ofManman Ren1-12/+12
the original parameter or return type. Since we do not accurately represent the data fields of a union, we should not directly load or store a union type. As an exmple, if we have i8,i8, i32, i32 as one field type and i32,i32 as another field type, the first field type will be chosen to represent the union. If we load with the union's type, the 3rd byte and the 4th byte will be skipped. rdar://12723368 llvm-svn: 168820
2012-11-28PR13098: If we're instantiating an overloaded binary operator and we couldRichard Smith1-1/+6
determine which member function would be the callee from within the template definition, don't pass that function as a "non-member function" to CreateOverloadedBinOp. Instead, just rely on it to select the member function for itself. llvm-svn: 168818
2012-11-28Refactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful ↵Alexey Samsonov2-46/+66
diagnostic for invalid sets of sanitizers llvm-svn: 168794
2012-11-28[asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), ↵Kostya Serebryany1-1/+2
Clang part. llvm-svn: 168782
2012-11-28Remove obsolete comment missed by r162937Andy Gibbs1-4/+0
llvm-svn: 168778
2012-11-28Teach Lexer::getSpelling about raw string literals. Specifically, if a rawRichard Smith1-42/+67
string literal needs cleaning (because it contains line-splicing in the encoding prefix or in the ud-suffix), do not clean the section between the double-quotes -- that's the "raw" bit! llvm-svn: 168776
2012-11-28Store on the CXXRecordDecl whether the class has, or would have, a copyRichard Smith5-248/+160
constructor/assignment operator with a const-qualified parameter type. The prior method for determining this incorrectly used overload resolution. llvm-svn: 168775
2012-11-28Remove workaround in RegionStore in r168741 since it is handled more ↵Ted Kremenek1-10/+8
generally by r168757. llvm-svn: 168774
2012-11-28Introduce ASTUnresolvedSet, an UnresolvedSet-like class, whose contents areArgyrios Kyrtzidis4-15/+16
allocated using the allocator associated with an ASTContext. Use this inside CXXRecordDecl::DefinitionData instead of an UnresolvedSet to avoid a potential memory leak. rdar://12761275 llvm-svn: 168771
2012-11-28Don't return a pointer to an UnresolvedSetImpl in the CXXRecordDecl interface,Argyrios Kyrtzidis7-64/+74
expose only the iterators instead. llvm-svn: 168770