| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 149124
|
|
|
|
|
|
|
|
|
|
| |
This is the last piece of N3031 (decltype in weird places) - supporting
the use of decltype in a class ctor's member-initializer-list to
specify the base classes to initialize.
Reviewed by Richard Smith.
llvm-svn: 148789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function body. This keeps the brace count accurate to prevent
additional errors. Also, moved the caret from the brace to the function
name.
Code:
class F{ int Foo{ return 1; } };
Fixed error:
parameters.cc:1:14: error: function definition does not declare parameters
class F{ int Foo{ return 1; } };
^
1 error generated.
Old errors:
parameters.cc:1:17: error: function definition does not declare parameters
class F{ int Foo{ return 1; } };
^
parameters.cc:1:30: error: expected ';' after class
class F{ int Foo{ return 1; } };
^
;
parameters.cc:1:31: error: expected external declaration
class F{ int Foo{ return 1; } };
^
3 errors generated.
llvm-svn: 148621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- If the declarator is at the start of a line, and the previous line contained
another declarator and ended with a comma, then that comma was probably a
typo for a semicolon:
int n = 0, m = 1, l = 2, // k = 5;
myImportantFunctionCall(); // oops!
- If removing the parentheses would correctly initialize the object, then
produce a note suggesting that fix.
- Otherwise, if there is a simple initializer we can suggest which performs
value-initialization, then provide a note suggesting a correction to that
initializer.
Sema::Declarator now tracks the location of the comma prior to the declarator in
the declaration, if there is one, to facilitate providing the note. The code to
determine an appropriate initializer from the -Wuninitialized warning has been
factored out to allow use in both that and -Wvexing-parse.
llvm-svn: 148072
|
|
|
|
|
|
|
|
| |
- reject definitions of enums within friend declarations
- require 'enum', not 'enum class', for non-declaring references to scoped
enumerations
llvm-svn: 147824
|
|
|
|
|
|
| |
intended to cover C++ class definitions.
llvm-svn: 147808
|
|
|
|
|
|
|
|
| |
so this patch is surprisingly small.
Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.
llvm-svn: 147221
|
|
|
|
| |
llvm-svn: 146138
|
|
|
|
| |
llvm-svn: 145785
|
|
|
|
|
|
|
|
|
|
|
|
| |
default", make a note of which is used when creating the
initial declaration. Previously, we would wait until later to handle
default/delete as a definition, but this is too late: when adding the
declaration, we already treated the declaration as "user-provided"
when in fact it was merely "user-declared".
Fixes PR10861 and PR10442, along with a bunch of FIXMEs.
llvm-svn: 144011
|
|
|
|
|
|
|
| |
entering the context of a nested-name-specifier. Fixes
<rdar://problem/10397846>.
llvm-svn: 143967
|
|
|
|
| |
llvm-svn: 142937
|
|
|
|
|
|
| |
Doug's feedback.
llvm-svn: 142935
|
|
|
|
| |
llvm-svn: 142929
|
|
|
|
|
|
| |
decltype-specification when specifying a base type.
llvm-svn: 142928
|
|
|
|
| |
llvm-svn: 142926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
analysis to separate dependent names from non-dependent names. For
dependent names, we'll behave differently from Visual C++:
- For __if_exists/__if_not_exists at class scope, we'll just warn
and then ignore them.
- For __if_exists/__if_not_exists in statements, we'll treat the
inner statement as a compound statement, which we only instantiate
in templates where the dependent name (after instantiation)
exists. This behavior is different from VC++, but it's as close as
we can get without encroaching ridiculousness.
The latter part (dependent statements) is not yet implemented.
llvm-svn: 142864
|
|
|
|
|
|
| |
'char32_t', 'constexpr', 'decltype', 'noexcept', 'nullptr' and 'static_assert'.
llvm-svn: 142302
|
|
|
|
|
|
|
| |
in -fms-extensions mode, make sure we actually use that initializer
after having handled the declaration. Fixes PR11150.
llvm-svn: 142195
|
|
|
|
|
|
| |
access specifier. The testcase has been changed to catch this too.
llvm-svn: 142186
|
|
|
|
| |
llvm-svn: 142056
|
|
|
|
|
|
| |
class/struct definition.
llvm-svn: 142054
|
|
|
|
| |
llvm-svn: 142049
|
|
|
|
|
|
|
| |
'final', and don't accept (then silently discard) braced init lists in C++98
new-expressions.
llvm-svn: 142048
|
|
|
|
| |
llvm-svn: 141999
|
|
|
|
|
|
| |
attributes are found, propagate them to subsequent declarations.
llvm-svn: 141861
|
|
|
|
|
|
| |
colon after access specifiers in C++
llvm-svn: 141852
|
|
|
|
|
|
|
| |
delimiter pairs and detect when we exceed the implementation limit for
nesting depth, from Aaron Ballman!
llvm-svn: 141782
|
|
|
|
| |
llvm-svn: 141610
|
|
|
|
|
|
|
| |
declarator, so that the declarator is in scope for the
initializer. Fixes PR9989.
llvm-svn: 141539
|
|
|
|
| |
llvm-svn: 141411
|
|
|
|
|
|
| |
attributes on the parameter declaration.
llvm-svn: 140944
|
|
|
|
|
|
|
| |
support for the C++0x draft [[align]] attribute and add the C1X
standard header file stdalign.h
llvm-svn: 140796
|
|
|
|
|
|
| |
attribute-specifiers
llvm-svn: 140794
|
|
|
|
|
|
| |
from Stepan Dyatkovskiy. Fixes PR10925.
llvm-svn: 140528
|
|
|
|
|
|
|
|
|
|
|
| |
correctly pass
the information on to Sema. There's still an incorrectness in the way template instantiation
works now, but that is due to a far larger underlying representational problem.
Also add a test case for various list initialization cases of scalars, which test this
commit as well as the previous one.
llvm-svn: 140460
|
|
|
|
| |
llvm-svn: 140389
|
|
|
|
|
|
|
|
| |
that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.
Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.
llvm-svn: 139987
|
|
|
|
| |
llvm-svn: 139406
|
|
|
|
|
|
| |
must also be present of the first declaration of that entity.
llvm-svn: 139384
|
|
|
|
|
|
|
| |
indicates that a declaration is only visible within the module it is
declared in.
llvm-svn: 139348
|
|
|
|
|
|
|
|
| |
class scope.
This patch was also written by DeLesley Hutchins.
llvm-svn: 139301
|
|
|
|
|
|
|
|
| |
Fix bug this uncovered.
Address minor comments from Doug.
Enable cxx_implicit_moves feature.
llvm-svn: 139101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would cut off the source file buffer at the code-completion
point; this impeded code-completion inside C++ inline methods and,
recently, with buffering ObjC methods.
Have the code-completion inserted into the source buffer so that it can
be buffered along with a method body. When we actually hit the code-completion
point the cut-off lexing or parsing.
Fixes rdar://10056932&8319466
llvm-svn: 139086
|
|
|
|
|
|
| |
a context switching object.
llvm-svn: 138248
|
|
|
|
|
|
| |
failures are resolved.
llvm-svn: 138234
|
|
|
|
| |
llvm-svn: 137653
|
|
|
|
|
|
| |
David Blaikie!
llvm-svn: 136876
|
|
|
|
|
|
|
| |
libstdc++ hack has reverted these type traits to keywords. Icky, but
fixes <rdar://problem/9836262>.
llvm-svn: 136560
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|