| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
separators in my previous patch.
llvm-svn: 218895
|
|
|
|
|
|
|
| |
number separator in "availability" attribute.
rdar://18490958
llvm-svn: 218884
|
|
|
|
|
|
|
|
|
| |
We build a NestedNameSpecifier that records the CXXRecordDecl in which
__super appeared. Name lookup is performed in all base classes of the
recorded CXXRecordDecl. Use of __super is allowed only inside class and
member function scope.
llvm-svn: 218484
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 217025
|
|
|
|
|
|
| |
contains an unmatched closing bracket token.
llvm-svn: 216518
|
|
|
|
|
|
| |
Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording.
llvm-svn: 215982
|
|
|
|
|
|
| |
location so their diagnostics have somewhere to point.
llvm-svn: 215416
|
|
|
|
|
|
|
|
|
|
|
| |
it. Diagnose with recovery if it appears after a function parameter that was
obviously supposed to be a parameter pack. Otherwise, warn if it immediately
follows a function parameter pack, because the user most likely didn't intend
to write a parameter pack followed by a C-style varargs ellipsis.
This warning can be syntactically disabled by using ", ..." instead of "...".
llvm-svn: 215408
|
|
|
|
|
|
|
|
|
|
|
|
| |
Array declarators involving the static keyword take on two forms:
D[ static type-qualifier-listopt assignment-expression ]
D[ type-qualifier-list static assignment-expression ]
Raise a diagnostic if the assignment-expression is missing.
This fixes PR20584.
llvm-svn: 215187
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parser::ParseDeclarationSpecifiers eagerly updates the source range of
the DeclSpec with the current token position. However, it might not
consume any more tokens.
Fix this by only setting the start of the range, not the end. This way
the SourceRange will be invalid if we don't consume any more tokens.
This fixes PR20413.
Differential Revision: http://reviews.llvm.org/D4646
llvm-svn: 214018
|
|
|
|
|
|
| |
prohibited by GCC as well.
llvm-svn: 213650
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If function parameters have default values, and that of the second
parameter is parsed with errors, function declaration would have
a parameter without default value that follows a parameter with
that. Such declaration breaks logic of selecting overloaded
function. As a solution, put opaque object as default value in such case.
This patch fixes PR20055.
Differential Revision: http://reviews.llvm.org/D4378
llvm-svn: 213594
|
|
|
|
|
|
|
| |
The parsing code for 'availability' wasn't prepared for string literals
like "a" L"b" showing up. Error if this occurs.
llvm-svn: 213350
|
|
|
|
|
|
| |
scope and syntax information for attributes with custom parsing. It turns out not to matter too much because the FIXME wasn't quite true -- none of these attributes have a C++11 spelling. However, it's still a good change (for instance, we may add an attribute with a type arg in the future for which this code now behaves properly).
llvm-svn: 213191
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recognize additional cases, when '::' is mistyped as ':'.
This is a fix to RP18587 - colons have too much protection in member-declarations
Review is tracked by http://reviews.llvm.org/D3653.
This is an attempt to recommit the fix, initially committed as r212957 but then
reverted in r212965 as it broke self-build. In the updated patch ParseDirectDeclarator
turns on colon protection in for context as well.
llvm-svn: 213120
|
|
|
|
|
|
|
|
| |
This reverts commit r212957. It broke the self-host on code like this
from LLVM's option library:
for (auto Arg: filtered(Id0, Id1, Id2))
llvm-svn: 212965
|
|
|
|
|
|
|
|
|
| |
Recognize additional cases, when '::' is mistyped as ':'.
This is a fix to RP18587 - colons have too much protection in member-declarations.
Differential Revision: http://reviews.llvm.org/D3653
llvm-svn: 212957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a user types:
int [4] foo;
assume that the user means:
int foo[4];
Update the information for 'foo' to prevent additional errors, and provide
a fix-it hint to move the brackets to the correct location.
Additionally, suggest parens for types that require it, such as:
int [4] *foo;
to:
int (*foo)[4];
llvm-svn: 211641
|
|
|
|
|
|
|
|
| |
Make it return void and delete the dead code in the parser that handled
the case where it might return false. This has been dead since 2010
when John deleted Action.h.
llvm-svn: 211248
|
|
|
|
|
|
|
|
|
|
| |
We may not have the mangling for static locals vs. enums completely figured out,
but at least for my simple test cases, enums should not increment the mangling
number.
Differential Revision: http://reviews.llvm.org/D4164
llvm-svn: 211078
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC delays parsing of default arguments until instantiation. If the
default argument is never used, it is never parsed. We don't model
this.
Instead, if lookup of a type name fails in a template argument context,
we form a DependentNameType, which will be looked up at instantiation
time.
This fixes errors about 'CControlWinTraits' in atlwin.h.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D3995
llvm-svn: 210382
|
|
|
|
|
|
| |
redundant ellipsis in parameter pack.
llvm-svn: 210304
|
|
|
|
|
|
| |
takeAs to getAs.
llvm-svn: 209800
|
|
|
|
| |
llvm-svn: 209275
|
|
|
|
| |
llvm-svn: 208943
|
|
|
|
| |
llvm-svn: 208366
|
|
|
|
|
|
|
|
|
|
| |
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: 208011
|
|
|
|
| |
llvm-svn: 207921
|
|
|
|
| |
llvm-svn: 207883
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
class.
llvm-svn: 203641
|
|
|
|
|
|
| |
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
|
|
|
|
|
|
|
|
|
|
|
|
| |
a missing include from CLog.h.
CLog.h referenced most of the core libclang types but never directly
included Index.h that provides them. Previously it got lucky and other
headers were always included first but with the sorting it ended up
first in one case and stopped compiling. Adding the Index.h include
fixes it right up.
llvm-svn: 202810
|
|
|
|
|
|
| |
the type of the first parameter fails, and it is the only, unnamed, parameter).
llvm-svn: 202759
|
|
|
|
|
|
| |
This is a continuation of r199686.
llvm-svn: 202307
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The language forbids defining enums in prototypes, so this check is normally
redundant, but if an enum is defined during template instantiation it should
not be added to the prototype scope.
While at it, clean up the code that deals with tag definitions in prototype
scope and expand the visibility warning to cover the case where an anonymous
enum is defined.
Differential Revision: http://llvm-reviews.chandlerc.com/D2742
llvm-svn: 201927
|
|
|
|
|
|
|
|
|
| |
and the class name is shadowed by another member. Recovery still needs
to be figured out, which is non-trivial since the parser has already gone
down a much different path than if it had recognized the class template
as type instead of seeing the member that shadowed the class template.
llvm-svn: 201360
|
|
|
|
|
|
|
|
| |
switches into a single file. This reduces build-related complexity by replacing four separate projects (and table-gen instantiations) with a single one.
No functional changes intended.
llvm-svn: 200424
|
|
|
|
|
|
|
|
| |
spelling, and a CXX11 spelling with the namespace "gnu". It also sets a bit on the spelling certifying that it is known to GCC. From this, we can warn about the extension appropriately. As a consequence, the FunctionDefinition functionality is completely removed.
Replacing the functionality from r199676, which didn't solve the problem as elegantly.
llvm-svn: 200252
|
|
|
|
|
|
| |
parser, and made it more declarative. If an attribute is allowed to appear on a function definition when late parsed, it can now use the FunctionDefinition attribute subject. It's treated as a FunctionDecl for most purposes, except it also gets exposed on the AttributeList so that it can be used while parsing.
llvm-svn: 199676
|
|
|
|
|
|
| |
might be member function declarations. Patch by Harald van Dijk!
llvm-svn: 199512
|
|
|
|
| |
llvm-svn: 199311
|
|
|
|
|
|
| |
parameter because the required information is encoded in the spelling. Added an appropriate subject to the attribute, and simplified the semantic checking (which will likely be expanded upon in a future patch). Also, removed the GNU spelling since it was unsupported in the first place.
llvm-svn: 199229
|
|
|
|
|
|
| |
Instead of mapping them to their semantics as a custom part of the parser, they instead map declaratively through the rest of the attribute system.
llvm-svn: 199175
|
|
|
|
|
|
| |
appears to be out-dated, and the attribute syntax is becoming more important these days.
llvm-svn: 199143
|