| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a crash when handling malformed arguments to loop pragmas such
as: "#pragma clang loop vectorize(()". Essentially any argument which is not an
identifier or constant resulted in a crash. This patch also changes a couple of
the error messages which weren't quite correct. New behavior with this patch vs
old behavior:
#pragma clang loop vectorize(1)
OLD: error: missing keyword; expected 'enable' or 'disable'
NEW: error: invalid argument; expected 'enable' or 'disable'
#pragma clang loop vectorize()
OLD: error: expected ')'
NEW: error: missing argument to loop pragma 'vectorize'
#pragma clang loop vectorize_width(bad)
OLD: error: missing value; expected a positive integer value
NEW: error: invalid argument; expected a positive integer value
#pragma clang loop vectorize(bad)
OLD: invalid keyword 'bad'; expected 'enable' or 'disable'
NEW: error: invalid argument; expected 'enable' or 'disable'
http://reviews.llvm.org/D4197
Patch by Mark Heffernan
llvm-svn: 211292
|
|
|
|
|
|
| |
declaring a template template parameter.
llvm-svn: 211031
|
|
|
|
|
|
|
|
|
|
|
| |
There are several Altivec tests that formerly ran only on big-endian
targets (and in some cases only on 32-bit targets). It is useful to
verify these on little-endian targets as well.
While testing these, I discovered a typo in <altivec.h>. This is also
fixed by this patch.
llvm-svn: 210928
|
|
|
|
|
|
|
|
| |
http://reviews.llvm.org/D4089
Patch by Mark Heffernan.
llvm-svn: 210667
|
|
|
|
|
|
| |
delete;'.
llvm-svn: 210617
|
|
|
|
|
|
| |
r210369 didn't quite catch all of them.
llvm-svn: 210593
|
|
|
|
|
|
| |
Patch thanks to Tyler Nowicki!
llvm-svn: 210330
|
|
|
|
|
|
|
|
|
|
|
| |
extension
With recent changes, this is now a compatible language extension and can be
safely enabled with -ms-extensions instead of requiring the full
-ms-compatibility MSVC drop-in mode. As such we can now also emit an extension
warning under -Wmicrosoft to help users port their code.
llvm-svn: 209978
|
|
|
|
| |
llvm-svn: 209730
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'optnone'.
This patch implements support for selectively disabling optimizations on a
range of function definitions through a pragma. The implementation is that
all function definitions in the range are decorated with attribute
'optnone'.
#pragma clang optimize off
// All function definitions in here are decorated with 'optnone'.
#pragma clang optimize on
// Compilation resumes as normal.
llvm-svn: 209510
|
|
|
|
|
|
|
|
|
| |
Make better diagnostic produced by erroneous switch statement.
It fixes PR19022.
Differential Revision: http://reviews.llvm.org/D3137
llvm-svn: 209302
|
|
|
|
|
|
|
|
|
| |
Also flesh out missing tests, improve diagnostic QOI and fix a couple of corner
cases found in the process.
Fixes PR10606.
llvm-svn: 209276
|
|
|
|
|
|
| |
that isn't always wrong.
llvm-svn: 208844
|
|
|
|
|
|
| |
type-id in a cast-expression.
llvm-svn: 208843
|
|
|
|
| |
llvm-svn: 208401
|
|
|
|
|
|
|
|
|
|
| |
Fix for PR19176. Clang will suggest a fix-it hint for cases like:
int arr[] = {1, 2, 3, 4};
for (auto i = arr)
^
:
llvm-svn: 208299
|
|
|
|
| |
llvm-svn: 207883
|
|
|
|
|
|
|
|
|
|
|
| |
class template member classes (PR19613)
Also improve this code in general by implementing suggestions
from Richard.
Differential Revision: http://reviews.llvm.org/D3555?id=9020
llvm-svn: 207822
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We never aka vector types because our attributed syntax for it is less
comprehensible than the typedefs. This leaves the user in the dark when
the typedef isn't named that well.
Example:
v2s v; v4f w;
w = v;
The naming in this cases isn't even that bad, but the error we give is
useless without looking up the actual typedefs.
t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s'
Now:
t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from
incompatible type 'v2s' (vector of 2 'int' values)
We do this for all diagnostics that print a vector type.
llvm-svn: 207267
|
|
|
|
|
|
|
|
|
| |
disabled, add -fmodules" error.
We disable modules for C++, at which point this is confusing.
rdar://16641918
llvm-svn: 206440
|
|
|
|
|
|
| |
post-commit review feedback. Amends r206186.
llvm-svn: 206229
|
|
|
|
|
|
|
|
|
|
| |
argument lists when the arguments are elided. eg)
__declspec(deprecated()) // error
__declspec(deprecated) // OK
__declspec(deprecated("")) // OK
llvm-svn: 206191
|
|
|
|
|
|
|
|
|
|
|
| |
when the arguments are elided. eg)
[[deprecated()]] // error
[[deprecated]] // OK
[[deprecated("")]] // OK
[[gnu::deprecated()]] // OK
llvm-svn: 206186
|
|
|
|
|
|
|
|
|
|
| |
Parse of nested name spacifier is modified so that it properly recovers
if colon is mistyped as double colon in case statement.
This patch fixes PR15133.
Differential Revision: http://llvm-reviews.chandlerc.com/D2870
llvm-svn: 206135
|
|
|
|
|
|
| |
properly.
llvm-svn: 206128
|
|
|
|
|
|
|
|
|
| |
This introduces the definitions needed for the Windows on ARM target. Add
target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI
environment. The Visual Studio definitions correspond to the definitions
provided by Visual Studio 2012.
llvm-svn: 205650
|
|
|
|
|
|
|
|
|
|
|
|
| |
at ... )')
For namespaces, this is consistent with mangling and GCC's debug info
behavior. For structs, GCC uses <anonymous struct> but we prefer
consistency between all anonymous entities but don't want to confuse
them with template arguments, etc, so we'll just go with parens in all
cases.
llvm-svn: 205398
|
|
|
|
|
|
|
|
| |
argument parsing code.
This removes a diagnostic that is no longer required (the semantic engine now properly handles attribute syntax so __declspec and __attribute__ spellings no longer get mismatched). This caused several testcases to need updating for a slightly different wording.
llvm-svn: 205234
|
|
|
|
|
|
| |
arguments that is currently being used by GNU and C++-style attributes. This allows C++11 attributes with argument lists to be handled properly, fixing the "deprecated", "type_visibility", and capability-related attributes with arguments.
llvm-svn: 205226
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Declaring a function as inline after it has been defined is in violation
of [dcl.fct.spec]p4. The program would get a strong definition instead
of getting a function with linkonce_odr linkage.
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3220
llvm-svn: 205129
|
|
|
|
|
|
| |
when modules are disabled. // rdar://15505492
llvm-svn: 204862
|
|
|
|
| |
llvm-svn: 204196
|
|
|
|
|
|
| |
its keywordliness.
llvm-svn: 203987
|
|
|
|
|
|
|
| |
Based on a patch and test by Stephan Tolksdorf! Refactoring and fixing adjacent
brokenness by me.
llvm-svn: 203733
|
|
|
|
| |
llvm-svn: 203628
|
|
|
|
| |
llvm-svn: 203602
|
|
|
|
|
|
| |
currently any type attributes which would apply to a lambda, except in MSVC compatibility mode.
llvm-svn: 203566
|
|
|
|
|
|
| |
the parameter list wasn't present.
llvm-svn: 203565
|
|
|
|
| |
llvm-svn: 203302
|
|
|
|
|
|
| |
the type of the first parameter fails, and it is the only, unnamed, parameter).
llvm-svn: 202759
|
|
|
|
|
|
|
|
|
| |
The DiagnosticBuilder's lifetime in parser typo recovery was overlapping with
the subsequent consume which can itself emit PP diagnostics.
Patch by Olivier Goffart!
llvm-svn: 201965
|
|
|
|
|
|
| |
_Atomic qualifier applied to a reference type.
llvm-svn: 201620
|
|
|
|
|
|
| |
spelled in an interesting way.
llvm-svn: 201536
|
|
|
|
| |
llvm-svn: 201532
|
|
|
|
|
|
|
|
|
|
|
| |
allow this, and we should warn on it, but it turns out that people were already
relying on this.
We should introduce a -Wgcc-compat warning for this if the attributes are known
to GCC, but we don't currently track enough information about attributes to do
so reliably.
llvm-svn: 200045
|
|
|
|
|
|
|
|
|
|
| |
member-declaration. In the process, fix a couple of bugs that had crept in
where we would parse the first and subsequent member-declarators differently
(in particular, we didn't accept an asm-label on a member function definition
within a class, and we would accept virt-specifiers and attributes in the wrong
order on the first declarator but not on subsequent ones).
llvm-svn: 199957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to statement expressions supported as GCC extension, it is possible
to put 'break' or 'continue' into a loop/switch statement but outside
its body, for example:
for ( ; ({ if (first) { first = 0; continue; } 0; }); )
This code is rejected by GCC if compiled in C mode but is accepted in C++
code. GCC bug 44715 tracks this discrepancy. Clang used code generation
that differs from GCC in both modes: only statement of the third
expression of 'for' behaves as if it was inside loop body.
This change makes code generation more close to GCC, considering 'break'
or 'continue' statement in condition and increment expressions of a
loop as it was inside the loop body. It also adds error for the cases
when 'break'/'continue' appear outside loop due to this syntax. If
code generation differ from GCC, warning is issued.
Differential Revision: http://llvm-reviews.chandlerc.com/D2518
llvm-svn: 199897
|
|
|
|
|
|
|
|
|
|
|
| |
a subprocess invocation which is pretty significant on Windows. It also
likely saves a bunch of thrashing the host machine needlessly. Finally
it makes the tests much more predictable and less dependent on the host.
For example 'header_lookup1.c' was passing '-fno-ms-extensions' just to
thwart the host detection adding it into the compilation. By runnig CC1
directly we don't have to deal with such oddities.
llvm-svn: 199308
|
|
|
|
|
|
| |
Warning for a duplicate 'constexpr' specifier.
llvm-svn: 198956
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
void knrNoSemi(i) int i { }
Adherents of The C Programming Language unfortunate enough to miss a semicolon
as above would be met with a cascade of errors spanning the remainder of the
TU.
This patch introduces a beautiful parse error recovery, complete with helpful
FixIt to restore sanity.
Before (output redacted for brevity):
error: 'error' diagnostics seen but not expected:
File declarators.c Line 119: declaration does not declare a parameter
File declarators.c Line 123: declaration does not declare a parameter
File declarators.c Line 127: parameter named 'func_E12' is missing
File declarators.c Line 127: expected ';' at end of declaration
File declarators.c Line 133: parameter named 'func_E13' is missing
File declarators.c Line 133: expected ';' at end of declaration
File declarators.c Line 139: parameter named 'func_E14' is missing
File declarators.c Line 139: expected ';' at end of declaration
File declarators.c Line 145: parameter named 'func_E15' is missing
File declarators.c Line 145: expected ';' at end of declaration
File declarators.c Line 150: expected function body after function declarator
File declarators.c Line 119: declaration of 'enum E11' will not be visible outside of this function
File declarators.c Line 123: declaration of 'enum E12' will not be visible outside of this function
File declarators.c Line 133: ISO C forbids forward references to 'enum' types
File declarators.c Line 133: declaration of 'enum E13' will not be visible outside of this function
File declarators.c Line 139: ISO C forbids forward references to 'enum' types
File declarators.c Line 139: declaration of 'enum E14' will not be visible outside of this function
File declarators.c Line 145: ISO C forbids forward references to 'enum' types
File declarators.c Line 145: declaration of 'enum E15' will not be visible outside of this function
...
After:
declarators.c:103:24: error: expected ';' at end of declaration
void knrNoSemi(i) int i { }
^
;
Patch found in a sealed envelope dated 1978 with the message "Do not open until
January 2014"
llvm-svn: 198540
|