- Feb 02, 2011
-
-
Douglas Gregor authored
savings of 25% sounds impressive, except that this amounted to only about 360k in our standard "large" completion result set (40,000 results). Since code completion is performance-sensitive, the 4% slowdown due to uniquing outweighs the 360k benefit. llvm-svn: 124737
-
Argyrios Kyrtzidis authored
llvm-svn: 124735
-
John McCall authored
on, as well as more reliably limiting invalid references to locals from nested scopes. llvm-svn: 124721
-
Ted Kremenek authored
Remove redundant check to not warn for warn_equality_with_extra_parens if we are in a macro. This is checked twice. llvm-svn: 124714
-
Douglas Gregor authored
speed but saves us about 25% of the memory usage for strings. llvm-svn: 124704
-
John McCall authored
llvm-svn: 124702
-
- Feb 01, 2011
-
-
Douglas Gregor authored
the string copying goes through a single place that can have associated state. llvm-svn: 124698
-
Ted Kremenek authored
Macros frequently contain extra '()' to make instantiation less error prone. This warning was flagging a ton of times on postgresql because of its use of macros. llvm-svn: 124695
-
Argyrios Kyrtzidis authored
llvm-svn: 124689
-
Douglas Gregor authored
eliminating the need to copy those strings. llvm-svn: 124683
-
Argyrios Kyrtzidis authored
llvm-svn: 124675
-
Douglas Gregor authored
BumpPtrAllocator, rather than manually new/delete'ing them. This optimization also allows us to avoid allocating memory for and copying constant strings (e.g., "return", "class"). This also required embedding the priority and availability of results within the code completion string, to avoid extra memory allocation within libclang. llvm-svn: 124673
-
Argyrios Kyrtzidis authored
It's highly likely that the user intended an assignment used as condition. Addresses rdar://8848646. llvm-svn: 124668
-
Ted Kremenek authored
Add temporary hack to -Wuninitialize to create a separate CFG (for C++ code) that doesn't include implicit dtors. Implicit dtors confuse the ad hoc path-sensitivity of UninitializedValuesV2.cpp. This isn't the ideal solution, as it will directly impact compile time, but should significantly reduce the noise of -Wuninitialized on some code bases. This immediately "fixes" the false positive reported in PR 9063, although this isn't the right fix in the long run. llvm-svn: 124667
-
Douglas Gregor authored
from Alex Miller! llvm-svn: 124663
-
John McCall authored
extremely rambunctious, both on parsing and on template instantiation. Calm it down, fixing an internal consistency assert on anonymous enum instantiation manglings. llvm-svn: 124653
-
Argyrios Kyrtzidis authored
compatible, not having the same type. Fix rdar://8183908 in which compatible vector types weren't initialized properly leading to a crash. llvm-svn: 124637
-
John McCall authored
CheckPointerTypesForAssignment. llvm-svn: 124632
-
Argyrios Kyrtzidis authored
llvm-svn: 124620
-
John McCall authored
working on canonical types already. llvm-svn: 124618
-
- Jan 31, 2011
-
-
John McCall authored
logic. llvm-svn: 124615
-
Argyrios Kyrtzidis authored
Add -Wcustom-atomic-properties which warns if an atomic-by-default property has custom getter or setter. The rationale is that it is highly likely that the user's getter/setter isn't atomically implemented. Off by default. Addresses rdar://8782645. -Wcustom-atomic-properties and -Wimplicit-atomic-properties are under the -Watomic-properties group. llvm-svn: 124609
-
Douglas Gregor authored
conversions (<rdar://problem/8592139>) for overload resolution. The conversion ranking mirrors C++'s conversion ranking fairly closely, except that we use a same pseudo-subtyping relationship employed by Objective-C pointer assignment rather than simple checking derived-to-base conversions. This change covers: - Conversions to pointers to a specific object type are better than conversions to 'id', 'Class', qualified 'id', or qualified 'Class' (note: GCC doesn't perform this ranking, but it matches C++'s rules for ranking conversions to void*). - Conversions to qualified 'id' or qualified 'Class' are better than conversions to 'id' or 'Class', respectively. - When two conversion sequences convert to the same type, rank the conversions based on the relationship between the types we're converting from. - When two conversion sequences convert from the same non-id, non-Class type, rank the conversions based on the relationship of the types we're converting to. (note: GCC allows this ranking even when converting from 'id', which is extremeley dangerous). llvm-svn: 124591
-
Argyrios Kyrtzidis authored
llvm-svn: 124585
-
Douglas Gregor authored
allow ref-qualifiers on function types used as template type arguments. GNU actually allows cv-qualifiers on function types in many places where it shouldn't, so we currently categorize this as a GNU extension. llvm-svn: 124584
-
-
-
Argyrios Kyrtzidis authored
Fix the diagnostic when we are shadowing an external variable and there exists a locally scoped extern with the same name. llvm-svn: 124580
-
Argyrios Kyrtzidis authored
llvm-svn: 124579
-
-
Argyrios Kyrtzidis authored
Fixes rdar://8736362. llvm-svn: 124577
-
Argyrios Kyrtzidis authored
Error for use of field from anonymous struct or union should say "invalid use of nonstatic data member" not "call to non-static member function without an object argument". llvm-svn: 124576
-
Argyrios Kyrtzidis authored
Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236. llvm-svn: 124575
-
- Jan 30, 2011
-
-
Anders Carlsson authored
current translation unit as available_externally. This helps devirtualize the second example in PR3100, comment 18: struct S { S() {}; virtual void xyzzy(); }; inline void foo(S *s) { s->xyzzy(); } void bar() { S s; foo(&s); } This involved four major changes: 1. In DefineUsedVTables, always mark virtual member functions as referenced for non-template classes and class template specializations. 2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are enabled, even if the key function is not implemented in this translation unit. We don't ever do this for code compiled with -fapple-kext, because we don't ever want to devirtualize virtual member function calls in that case. 3. Give the correct linkage for vtables where the key function is not defined. 4. Update the linkage for RTTI structures when necessary. llvm-svn: 124565
-
- Jan 28, 2011
-
-
John McCall authored
llvm-svn: 124505
-
Douglas Gregor authored
might be queried in places where we absolutely require a valid location (e.g., for template instantiation). Fixes some major brokenness in the use of __is_convertible_to. llvm-svn: 124465
-
Douglas Gregor authored
llvm-svn: 124455
-
- Jan 27, 2011
-
-
Douglas Gregor authored
access control errors into SFINAE errors, so that the trait provides enough support to implement the C++0x std::is_convertible type trait. To get there, the SFINAETrap now knows how to set up a SFINAE context independent of any template instantiations or template argument deduction steps, and (separately) can set a Sema flag to translate access control errors into SFINAE errors. The latter can also be useful if we decide that access control errors during template argument deduction should cause substitution failure (rather than a hard error) as has been proposed for C++0x. llvm-svn: 124446
-
Douglas Gregor authored
llvm-svn: 124441
-
Douglas Gregor authored
Document some serious badness in our evaluation of the type traits: we need to be sure we have complete types in many cases llvm-svn: 124428
-