- Dec 27, 2013
-
-
Kostya Serebryany authored
Summary: This is an alternative to http://llvm-reviews.chandlerc.com/D2475 suggested by Chandler. Reviewers: chandlerc, rnk, dblaikie CC: cfe-commits, earthdok Differential Revision: http://llvm-reviews.chandlerc.com/D2478 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198073 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1); After: void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( int aaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198070 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
Thisadds a new warning that warns on code like this: if (memcmp(a, b, sizeof(a) != 0)) The warning looks like: test4.cc:5:30: warning: size argument in 'memcmp' call is a comparison [-Wmemsize-comparison] if (memcmp(a, b, sizeof(a) != 0)) ~~~~~~~~~~^~~~ test4.cc:5:7: note: did you mean to compare the result of 'memcmp' instead? if (memcmp(a, b, sizeof(a) != 0)) ^ ~ ) test4.cc:5:20: note: explicitly cast the argument to size_t to silence this warning if (memcmp(a, b, sizeof(a) != 0)) ^ (size_t)( ) 1 warning generated. This found 2 bugs in chromium and has 0 false positives on both chromium and llvm. The idea of triggering this warning on a binop in the size argument is due to rnk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198063 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 26, 2013
-
-
Warren Hunt authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198060 91177308-0d34-0410-b5e6-96231b3b80d8
-
Warren Hunt authored
With pragma pack, the layout engine would produce vfptrs that were packed width rather than pointer width. This patch addresses the issue and adds a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198059 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Teach the diagnostics engine about the Attr type to make reporting on semantic attributes easier (and not require hard-coded strings). This requires a getSpelling() function on the Attr class, which is table-driven. Updates a handful of cases where a hard-coded string was being used to test the functionality out. Updating associated test cases for the improved quoting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198055 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Removed a string literal for an attribute name, which means the attribute name will be quoted in the diagnostic. Manually added some quotes to a diagnostic for consistency. Updated the test cases as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198054 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
This diagnostic did not accept arguments, and did not have any test coverage. Parameterized the diagnostic, and made it more consistent with other attribute diagnostic wordings. Added test coverage. Since this warning was generalized, it was also given a sensible warning group flag and the corresponding test was updated to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198053 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Thanks to Alp Toker for the naming suggestion! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198052 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Simplifying some diagnostics so that they don't need to work with StringRefs. No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198051 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198050 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198049 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198047 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Removing some unneeded code, and a diagnostic that was obsoleted. The type has already been determined to be a ValueDecl by virtue of the attribute subjects. Added some test case coverage as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198046 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 25, 2013
-
-
Alp Toker authored
Even g++ considers this a valid C++ identifier and it should only have been visible in C mode. Also drop the associated low-value diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197995 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jiangning Liu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197994 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 24, 2013
-
-
Nico Weber authored
(See discussion in the bug for why this isn't XFAILed.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197991 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: Constructor() : a(a) {} After: Constructor() : a(a) { } This style guide is pretty precise about this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197980 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
Introduce proper facilities to render token spellings using the diagnostic formatter. Replaces most of the hard-coded diagnostic messages related to expected tokens, which all shared the same semantics but had to be multiply defined due to variations in token order or quote marks. The associated parser changes are largely mechanical but they expose commonality in whole chunks of the parser that can now be factored away. This commit uses C++11 typed enums along with a speculative legacy fallback until the transition is complete. Requires corresponding changes in LLVM r197895. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197972 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 23, 2013
-
-
Alp Toker authored
A lot of callers have been using this facility incorrectly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197920 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197916 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
There's no need to escape strings and generate new DiagIDs for each message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197915 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197912 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197911 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Introduced in r197900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197906 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
Spotted by Edward git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197903 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
The TextDiagnosticBuffer is meant to scrub SourceLocations as the input/output SourceManagers may be different. To be safe this commit restores the original behaviour though in practice all current users seem to share a single SM. Would be nice to replace TextDiagnosticBuffer now that more capable interfaces like CaptureDiagnosticConsumer / StoredDiagnosticConsumer exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197902 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Among other things, this fixes llvm.org/PR15269. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197900 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hao Liu authored
[AArch64]The compare to zero intrinsics should be implemented by 'icmp/fcmp' and 'sext' not 'zext'. Modify the implementation by replacing zext with sext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197898 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 22, 2013
-
-
Alp Toker authored
These names weren't referred to anywhere in the source so don't need a written name. Depends on the TableGen fix for anonymous records in LLVM r197869. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197896 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 21, 2013
-
-
Aaron Ballman authored
Removing the alloc_size attribute. The attribute was semantically handled, but silently ignored. Most of this feature was already reverted in June 2012 (r159016), this just cleans up the pieces left over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197866 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
The const and nothrow attributes can be handled by the simple attribute handler. This removes a silent dropping of the attributes when they are duplicated on a Decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197864 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
DiagIDs are a cached resource generally only constructed from compile-time constant or stable format strings. Escaping arbitrary messages and constructing DiagIDs from them didn't make sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197856 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
This was setting a bad example. DiagIDs are a limited resource and the message argument is evaluated as a format string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197855 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
This new warning detects when a function will recursively call itself on every code path though that function. This catches simple recursive cases such as: void foo() { foo(); } As well as more complex functions like: void bar() { if (test()) { bar(); return; } else { bar(); } return; } This warning uses the CFG. As with other CFG-based warnings, this is off by default. Due to false positives, this warning is also disabled for templated functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197853 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
[CMake] clang/lib/Headers: Install just-generated ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h, instead of copied arm_neon.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197852 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
Sema relies on this assumption. Follow-up to r197848. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197850 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
intentional stack overflow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197849 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
Without this patch, record decls with invalid out-of-line method delcs would sometimes be marked invalid, but not always. With this patch, they are consistently never marked invalid. (The code to do this was added in http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100809/033154.html , but the test from that revision is still passing.) As far as I can tell, this was the only place where a class was marked invalid after its definition was complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197848 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Now CodeGenVTables has only one VTableContext object, which is either Itanium or Microsoft. Fixes a FIXME with no functionality change intended. Ideally we could avoid the downcasts by pushing the things that reference the Itanium vtable context into ItaniumCXXABI.cpp, but we're not there yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197845 91177308-0d34-0410-b5e6-96231b3b80d8
-