| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ParseSingleDeclarationAfterTemplate(), for now. [-Wdocumentation]
/// \param TemplateParams if non-NULL, the template parameter lists
/// that preceded this declaration. In this case, the declaration is a
/// template declaration, out-of-line definition of a template, or an
/// explicit template specialization. When NULL, the declaration is an
/// explicit template instantiation.
///
/// \param TemplateLoc when TemplateParams is NULL, the location of
/// the 'template' keyword that indicates that we have an explicit
/// template instantiation.
llvm-svn: 167982
|
| |
|
|
| |
llvm-svn: 167908
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
positions of Objective-C methods.
It is possible to recover a lot of type information about
Objective-C methods from the reflective metadata for their
implementations. This information is not rich when it
comes to struct types, however, and it is not possible to
produce a type in the debugger's round-tripped AST which
will really do anything useful during type-checking.
Therefore we allow __unknown_anytype in these positions,
which essentially disables type-checking for that argument.
We infer the parameter type to be the unqualified type of
the argument expression unless that expression is an
explicit cast, in which case it becomes the type-as-written
of that cast.
rdar://problem/12565338
llvm-svn: 167896
|
| |
|
|
|
|
| |
Based on post-commit review feedback for r167766 by Richard Smith.
llvm-svn: 167856
|
| |
|
|
|
|
|
| |
Introduces more clear scoping flags & flag combinations which should hopefully
be more understandable.
llvm-svn: 167766
|
| |
|
|
|
|
|
|
|
|
|
|
| |
C++11 3.3.3/2 "A parameter name shall not be redeclared in the outermost block
of the function definition nor in the outermost block of any handler associated
with a function-try-block."
It's not totally clear to me whether the "FIXME" case is covered by this, but
Richard Smith thinks it probably should be. It's just a bit more involved to
fix that case.
llvm-svn: 167650
|
| |
|
|
| |
llvm-svn: 167547
|
| |
|
|
|
|
|
|
|
| |
specifiers.
We don't support any C++11 attributes that appertain to declaration specifiers so reject
the attributes in parser until we support them; this also conforms to what g++ 4.8 is doing.
llvm-svn: 167481
|
| |
|
|
|
|
|
|
| |
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.
llvm-svn: 167423
|
| |
|
|
|
|
| |
compound statement.
llvm-svn: 167363
|
| |
|
|
|
|
| |
attributes are attached to function declarations nested inside a class method.
llvm-svn: 167321
|
| |
|
|
|
|
| |
cite C++11.
llvm-svn: 167273
|
| |
|
|
|
|
|
| |
')', if found. Don't crash.
Fixes PR11852.
llvm-svn: 167268
|
| |
|
|
|
|
|
|
| |
directly
without using tentative parsing.
llvm-svn: 167142
|
| |
|
|
|
|
| |
add a test to make sure code-completion skips bodies.
llvm-svn: 167141
|
| |
|
|
|
|
| |
Patch from Brian Brooks <brooks.brian@gmail.com>!
llvm-svn: 166893
|
| |
|
|
|
|
|
|
| |
and could cause the Parser to crash on the first ConsumeToken().
Patcy by Bas van den Berg!
llvm-svn: 166891
|
| |
|
|
| |
llvm-svn: 166871
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenMP support.
Sub-Feature:
Support for "#pragma omp ..." registration with
Preprocessor.
Files Changed/Added:
* include/clang/Basic/DiagnosticGroups.td (C)
* include/clang/Basic/DiagnosticParseKinds.td (C)
* include/clang/Basic/TokenKinds.def (C)
* include/clang/Parse/Parser.h (C)
* lib/Parse/Parser.cpp (C)
Test Cases Changed/Added:
* test/Preprocessor/pragma_omp.c (A)
* test/Preprocessor/pragma_omp_ignored_warning.c (A)
llvm-svn: 166869
|
| |
|
|
| |
llvm-svn: 166867
|
| |
|
|
|
|
|
| |
is at the end of parsed tokens when an error occurs, otherwise we'll hit
an assertion when trying to annotate the decltype tokens.
llvm-svn: 166826
|
| |
|
|
|
|
| |
this, for better error recovery.
llvm-svn: 166645
|
| |
|
|
|
|
|
| |
declarations and statements. Emit an error if the FP_CONTRACT is used
later in a compound statement.
llvm-svn: 166383
|
| |
|
|
|
|
| |
literal-operator-id.
llvm-svn: 166373
|
| |
|
|
| |
llvm-svn: 166152
|
| |
|
|
| |
llvm-svn: 165974
|
| |
|
|
| |
llvm-svn: 165810
|
| |
|
|
|
|
|
|
|
| |
auto x((unknown));
int& y = x;
would crash because we were not flagging 'x' as an invalid declaration here.
llvm-svn: 165675
|
| |
|
|
|
|
|
| |
I think our general framework for parser pragmas needs a bit more work,
but I'm not planning on working on it at the moment.
llvm-svn: 165558
|
| |
|
|
|
|
| |
contexts. <rdar://problem/12453134>
llvm-svn: 165462
|
| |
|
|
| |
llvm-svn: 165259
|
| |
|
|
|
|
|
|
| |
For GNU attributes, instead of reusing attribute source
location for the scope location, use SourceLocation() since
GNU attributes don not have scope tokens.
llvm-svn: 165234
|
| |
|
|
|
|
|
| |
mess by handling all pragmas which the parser touches uniformly.
<rdar://problem/12248901>, etc.
llvm-svn: 165195
|
| |
|
|
|
|
|
|
| |
- General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST.
- Add support to parse arguments of attributes that in 'gnu' namespace.
- Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic.
llvm-svn: 165082
|
| |
|
|
|
|
|
|
| |
Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).
llvm-svn: 164989
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
typeid (and a couple other non-standard places where we can transform an
unevaluated expression into an evaluated expression) is special
because it introduces an an expression evaluation context,
which conflicts with the mechanism to compute the current
lambda mangling context. PR12123.
I would appreciate if someone would double-check that we get the mangling
correct with this patch.
llvm-svn: 164658
|
| |
|
|
|
|
| |
Patch by Andy Gibbs!
llvm-svn: 164591
|
| |
|
|
|
|
| |
Patch by Andy Gibbs!
llvm-svn: 164590
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
but can be dereferenced to form an expression which does have viable begin/end
functions, then typo-correct the range, even if something else goes wrong with
the statement (such as inaccessible begin/end or the wrong type of loop
variable).
In order to ensure we recover correctly and produce any followup diagnostics in
this case, redo semantic analysis on the for-range statement outside of the
diagnostic trap, after issuing the typo-correction.
llvm-svn: 164323
|
| |
|
|
|
|
|
|
| |
start of a statement or the end of a compound-statement, diagnose the comma as
a typo for a semicolon. Patch by Ahmed Bougacha! Additional test cases and
minor refactoring by me.
llvm-svn: 164085
|
| |
|
|
|
|
| |
argument names. // rdar://12263549
llvm-svn: 164077
|
| |
|
|
|
|
|
| |
between objc method parameter name and colon.
// rdar://12263549
llvm-svn: 164047
|
| |
|
|
| |
llvm-svn: 163983
|
| |
|
|
|
|
| |
change (the problematic cases in ParseDecl.cpp are currently impossible).
llvm-svn: 163920
|
| |
|
|
| |
llvm-svn: 163826
|
| |
|
|
| |
llvm-svn: 163722
|
| |
|
|
|
|
|
| |
We plan on discussing this more, but we shouldn't have it in the compiler
in an incomplete state.
llvm-svn: 163720
|
| |
|
|
|
|
| |
We plan on discussing this more.
llvm-svn: 163719
|
| |
|
|
|
|
| |
':' in its name. // rdar://8366823
llvm-svn: 163650
|
| |
|
|
|
|
|
| |
name results in unintended selector name.
// rdar://12263549
llvm-svn: 163634
|