| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
the offending attribute name. Also updates the associated test cases.
llvm-svn: 198355
|
|
|
|
|
|
| |
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.
llvm-svn: 198055
|
|
|
|
|
|
| |
name will be quoted in the diagnostic. Manually added some quotes to a diagnostic for consistency. Updated the test cases as appropriate.
llvm-svn: 198054
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 198053
|
|
|
|
|
|
| |
but silently ignored. Most of this feature was already reverted in June 2012 (r159016), this just cleans up the pieces left over.
llvm-svn: 197866
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'deprecated'.
Fixes <rdar://problem/15584219> and <rdar://problem/12241361>.
This change looks large, but all it does is reuse and consolidate
the delayed diagnostic logic for deprecation warnings with unavailability
warnings. By doing so, it showed various inconsistencies between the
diagnostics, which were close, but not consistent. It also revealed
some missing "note:"'s in the deprecated diagnostics that were showing
up in the unavailable diagnostics, etc.
This change also changes the wording of the core deprecation diagnostics.
Instead of saying "function has been explicitly marked deprecated"
we now saw "'X' has been been explicitly marked deprecated". It
turns out providing a bit more context is useful, and often we
got the actual term wrong or it was not very precise
(e.g., "function" instead of "destructor"). By just saying the name
of the thing that is deprecated/deleted/unavailable we define
this issue away. This diagnostic can likely be further wordsmithed
to be shorter.
llvm-svn: 197627
|
|
|
|
|
|
|
| |
that we consider a function for the purposes of checking \param and \returns,
look through reference types.
llvm-svn: 197530
|
|
|
|
|
|
| |
boost::function and similar function-like objects
llvm-svn: 197528
|
|
|
|
|
|
| |
these tests
llvm-svn: 197517
|
|
|
|
|
|
|
|
|
|
| |
An empty string for an ASM input constraint is invalid, and will crash
during clang CodeGen. Change TargetInfo::validateInputConstraint to
reject an empty string.
<rdar://problem/15552191>
llvm-svn: 197362
|
|
|
|
|
|
|
|
|
|
| |
attributes via the ParseKind field. Attributes will be given a common parsed attribute identifier (the AttributeList::AT_* enum), but retain distinct Attr subclasses.
This new functionality is used to implement the ARM and MSP430 interrupt attribute.
Patch reviewed by Richard Smith over IRC.
llvm-svn: 197343
|
|
|
|
|
|
|
|
|
|
| |
This patch was submitted to the list for review and didn't receive a LGTM.
(In fact one explicit objection and one query were raised.)
This reverts commit r197295.
llvm-svn: 197299
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D2392
llvm-svn: 197295
|
|
|
|
|
|
| |
more consistent with other attributes.
llvm-svn: 197104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a line like
// expected-error-re {{foo}}
treats the entirety of foo as a regex. This is inconvenient when matching type
names containing regex characters. For example, to match
"void *(class test8::A::*)(void)" inside such a regex, one would have to type
"void \*\(class test8::A::\*\)\(void\)".
This patch changes the semantics of expected-error-re to only treat the parts
of the directive wrapped in double curly braces as regexes. This avoids the
escaping problem and leads to nicer patterns for those cases; see e.g. the
change to test/Sema/format-strings-scanf.c.
(The balanced search for closing }} of a directive also makes us handle the
full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.)
Differential Revision: http://llvm-reviews.chandlerc.com/D2388
llvm-svn: 197092
|
|
|
|
|
|
| |
except for GNU attributes, or C++11-style attributes in the GNU namespace. This prevents attributes such as __declspec(__dllexport__) or [[__noreturn__]] from being treated as known attributes.
llvm-svn: 197082
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed from:
keyword '__is_empty' will be treated as an identifier for the remainder of the translation unit
To:
keyword '__is_empty' will be made available as an identifier for the remainder of the translation unit
This is a more accurate description of clang's keyword compatibility feature,
given that some of the keywords are turned into context-sensitive keywords
(e.g. REVERTIBLE_TYPE_TRAIT) rather than being fully disabled.
llvm-svn: 196776
|
|
|
|
|
|
|
| |
This should get it up and running on win and other builders without system
headers.
llvm-svn: 196738
|
|
|
|
|
|
|
|
| |
Add -verify and update the test directives to match current expectations.
Also add a FIXME to an ObjC test that has expected-* directives but no -verify.
llvm-svn: 196737
|
|
|
|
|
|
|
| |
Going by PR6913 it looks like this one can no longer reach CodeGen so remove
the redundant -emit-llvm case and treat it as an ordinary Sema test.
llvm-svn: 196736
|
|
|
|
|
|
|
|
| |
These were being substituted into approximately the following:
clang -cc1 -internal-isystem ../lib/clang/3.5/include_only
llvm-svn: 196730
|
|
|
|
|
|
|
|
| |
Due to a missing -verify, 2007-10-01-BuildArrayRef.c was a no-op.
The message was changed 5 years ago so also update the test to reflect the new wording.
llvm-svn: 196729
|
|
|
|
|
|
|
|
| |
We already support using "r" on 64-bit values (a GPRPair is
allocated), but Sema doesn't know this yet so issues a warning. This
should fix it.
llvm-svn: 196724
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes -Wassign-enum to compare unqualified types. One could
think that this does not matter much, because who wants a value of enum type
that is const-qualified? But this breaks the intended pattern to silence this
warning with an explicit cast:
static const enum Foo z = (enum Foo) 42;
In this case, source type is 'enum Foo', and destination type is 'const enum
Foo', and if we compare qualified types, they don't match, so we used warn.
llvm-svn: 196548
|
|
|
|
|
|
|
|
|
|
| |
the following pattern.
If 'case' expression refers to a static const variable of the correct enum
type, then we count this as a sufficient declaration of intent by the user,
so we silence the warning.
llvm-svn: 196546
|
|
|
|
|
|
|
| |
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
|
|
|
|
|
|
| |
though some test cases needed to be updated for attribute names becoming quoted.
llvm-svn: 196417
|
|
|
|
|
|
| |
unresolved identifier the same way that we do for unknown arguments. This resolves PR18075, where we regressed the handling of OpenBSD's bounded attribute.
llvm-svn: 196387
|
|
|
|
| |
llvm-svn: 196350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang converts keywords to identifiers for compatibility with various system
headers such as GNU libc.
Implement a -Wkeyword-compat extension warning to diagnose those cases. The
warning is on by default but will generally be ignored in system headers. It
can however be enabled globally to aid standards conformance testing.
This also changes the __uptr keyword avoidance from r195710 to no longer
special-case system headers, bringing it in line with other similar workarounds
in clang.
Implementation returns bool for symmetry with token annotation functions.
Some examples:
warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat]
struct __is_pod
warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat]
union w *__uptr;
llvm-svn: 196212
|
|
|
|
|
|
|
|
| |
lookup, if parsing failed, we did not restore the lexer state properly, and
eventually crashed. This change ensures that we always consume all the tokens
from the new token stream we started to parse the name from inline asm.
llvm-svn: 196182
|
|
|
|
|
|
|
|
| |
token.
This would crash if the token is used in another diagnostic. PR18051.
llvm-svn: 196048
|
|
|
|
|
|
| |
LLVM r196044 should make it pass.
llvm-svn: 196045
|
|
|
|
|
|
| |
diagnostic for attribute subjects. In turn, this allows the Subjects to be enabled for some more attributes and improves diagnostics. Updated a test case based on the improved diagnostic.
llvm-svn: 195864
|
|
|
|
|
|
| |
intended.
llvm-svn: 195770
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNU libc uses '__uptr' as a member name in C mode, conflicting with the
eponymous MSVC pointer modifier keyword.
Detect and mark the token as an identifier when these specific conditions are
met. __uptr will continue to work as a keyword for the remainder of the
translation unit.
Fixes PR17824.
llvm-svn: 195710
|
|
|
|
|
|
|
|
| |
Attr.td. Also updated the related testcase.
Reviewed by Dmitri Gribenko.
llvm-svn: 195675
|
|
|
|
|
|
| |
as behaviorally in MSVC). This adds a generic diagnostic that we use for uuid, and can use for some other attributes as well, and adds a testcase.
llvm-svn: 195580
|
|
|
|
|
|
|
| |
expression that is not a zero literal, in C. This is a different, and more
targeted, approach than that in r194540.
llvm-svn: 195303
|
|
|
|
|
|
| |
considerable amount of duplicated code.
llvm-svn: 195302
|
|
|
|
|
|
| |
Switched the attribute to have the proper spelling, gave it a subject, updated the warning to be more accurate, and updated the test case as appropriate.
llvm-svn: 195277
|
|
|
|
|
|
| |
a test case to ensure the diagnostic was firing properly.
llvm-svn: 195188
|
|
|
|
| |
llvm-svn: 195126
|
|
|
|
|
|
| |
currently handled. Specifically: the diagnostics in SemaDeclAttr.cpp, and ensuring that calling convention attributes are applied to ObjC method declarations. No functional changes.
llvm-svn: 195098
|
|
|
|
|
|
|
| |
the GNU documentation: the attribute only appertains to the label if it is
followed by a semicolon. Based on a patch by Aaron Ballman!
llvm-svn: 194869
|
|
|
|
|
|
|
|
|
|
|
| |
We already have builtins that are only available in GNU mode, so this
mirrors that.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D2128
llvm-svn: 194615
|
|
|
|
|
|
|
|
|
| |
This patch fixes PR8264. Duplicate qualifiers already are diagnozed,
now the same diagnostics is issued for duplicate function specifiers.
Differential Revision: http://llvm-reviews.chandlerc.com/D2025
llvm-svn: 194559
|
|
|
|
|
|
| |
expression that is not a zero literal, in C. Patch by Ivan A. Kosarev!
llvm-svn: 194540
|
|
|
|
| |
llvm-svn: 194197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The determination of which diagnostics would be issued for certain
anonymous unions started to get a little ridiculous. Clean this up by
inverting the condition-tree's logic from dialect -> issue to
issue -> diagnostic.
As part of this cleanup, move ext_c99_flexible_array_member from
DiagnosticParseKinds.td to DiagnosticSemaKinds.td because it's driven by
Sema, not Parse.
Also, the liberty was taken to edit ext_c99_flexible_array_member to
match other, similar, diagnostics.
llvm-svn: 193919
|