| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 270010
|
|
|
|
|
|
|
|
|
|
| |
an identifier table lookup, *and* copy the LangOptions (including various
std::vector<std::string>s). Twice. We call this function once each time we start
parsing a declaration specifier sequence, and once for each call to Sema::Diag.
This reduces the compile time for a sample .c file from the linux kernel by 20%.
llvm-svn: 270009
|
|
|
|
|
|
|
| |
Expected diagnostics have been expanded to vary by C++ dialect.
RUN line has also been expanded to: default, C++98/03 and C++11.
llvm-svn: 252785
|
|
|
|
|
|
| |
Found by SLi's bot.
llvm-svn: 229532
|
|
|
|
|
|
|
|
|
|
| |
If an unscoped enum is used as a nested name specifier and the language dialect
is not C++ 11, issue an extension warning.
This fixes PR16951.
Differential Revision: http://reviews.llvm.org/D6389
llvm-svn: 226413
|
|
|
|
|
|
|
|
|
| |
Previously if an enumeration was used in a nested name specifier in pre-C++11
language dialect, error message was 'XXX is not a class, namespace, or scoped
enumeration'. This patch removes the word 'scoped' as in C++11 any enumeration
may be used in this context.
llvm-svn: 226410
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name specifier.
Rather than simply saying "X is not a class or namespace", clarify what
X is by providing the aka type in the case where X is a type, or
pointing to the named declaration if there's an unambiguous one to refer
to. In the ambiguous case, the ambiguities are already enumerated
(though could be clarified by describing what kind of entities they are)
Included a few FIXMEs in tests where some further improvements could be
made.
llvm-svn: 201038
|
|
|
|
|
|
|
| |
conversion on the LHS of a .* or ->*. Slightly improve diagnostics in case
of an ambiguous base class.
llvm-svn: 197125
|
|
|
|
|
|
|
| |
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.
llvm-svn: 142219
|
|
|
|
|
|
| |
and the RHS of .*. Noticed by Enea Zaffanella!
llvm-svn: 134170
|
|
|
|
|
|
| |
PR9973 / <rdar://problem/9479191>.
llvm-svn: 131810
|
|
|
|
|
|
|
|
|
| |
that the class type into which the pointer points be complete, even
though the standard requires it. GCC/EDG do not require a complete
type here, so we're calling this a problem with the standard. Fixes
PR8328.
llvm-svn: 116429
|
|
|
|
|
|
|
| |
we don't see a DeclStmt (failure to instantiate which generally causes
panic).
llvm-svn: 112282
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an '&' expression from the second caller of ActOnIdExpression.
Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.
Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.
Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.
llvm-svn: 112258
|
|
|
|
|
|
|
| |
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a
canonical type. Fixes PR7176.
llvm-svn: 104374
|
|
|
|
|
|
| |
if the type isn't exactly the same as the container class. Fixes PR6783.
llvm-svn: 102186
|
|
|
|
|
|
| |
complete. Enforce this.
llvm-svn: 100925
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
destination type for initialization, assignment, parameter-passing,
etc. The main issue fixed here is that we used rather confusing
wording for diagnostics such as
t.c:2:9: warning: initializing 'char const [2]' discards qualifiers,
expected 'char *' [-pedantic]
char *name = __func__;
^ ~~~~~~~~
We're not initializing a 'char const [2]', we're initializing a 'char
*' with an expression of type 'char const [2]'. Similar problems
existed for other diagnostics in this area, so I've normalized them all
with more precise descriptive text to say what we're
initializing/converting/assigning/etc. from and to. The warning for
the code above is now:
t.c:2:9: warning: initializing 'char *' from an expression of type
'char const [2]' discards qualifiers [-pedantic]
char *name = __func__;
^ ~~~~~~~~
Fixes <rdar://problem/7447179>.
llvm-svn: 100832
|
|
|
|
|
|
|
|
|
|
| |
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).
Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.
llvm-svn: 98149
|
|
|
|
|
|
|
|
|
|
| |
propagating error conditions out of the various annotate-me-a-snowflake
routines. Generally (but not universally) removes redundant diagnostics
as well as, you know, not crashing on bad code. On the other hand,
I have just signed myself up to fix fiddly parser errors for the next
week. Again.
llvm-svn: 97221
|
|
|
|
|
|
| |
function. Fixes PR5985.
llvm-svn: 93150
|
|
|
|
|
|
|
|
| |
small bug fixes in SemaInit, switch over SemaDecl to use it more often, and
change a bunch of diagnostics which are different with the new initialization
code.
llvm-svn: 91767
|
|
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
|
|
|
| |
llvm-svn: 83562
|
|
|
|
|
|
|
|
|
|
| |
pointers, by extending the "composite pointer type" logic to include
member pointer types.
Introduce test cases for member pointer comparisons, including those
that involve the builtin operator candidates implemented earlier.
llvm-svn: 79925
|
|
|
|
| |
llvm-svn: 74481
|
|
|
|
|
|
| |
T::*) and implement template instantiation for member pointer types.
llvm-svn: 73151
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template<typename T>
struct X {
struct Inner;
};
template struct X<int>::Inner;
This change is larger than it looks because it also fixes some
a problem with nested-name-specifiers and tags. We weren't requiring
the DeclContext associated with the scope specifier of a tag to be
complete. Therefore, when looking for something like "struct
X<int>::Inner", we weren't instantiating X<int>.
This, naturally, uncovered a problem with member pointers, where we
were requiring the left-hand side of a member pointer access
expression (e.g., x->*) to be a complete type. However, this is wrong:
the semantics of this expression does not require a complete type (EDG
agrees).
Stuart vouched for me. Blame him.
llvm-svn: 71756
|
|
|
|
|
|
|
|
|
|
| |
"function designator".
(This causes a minor glitch in the
diagnostics for C++ member pointers, but we weren't printing the
right diagnostic there anyway.)
llvm-svn: 70307
|
|
|
|
|
|
|
| |
incomplete types. RequireCompleteType is needed when the type may be
completed by instantiating a template.
llvm-svn: 67643
|
|
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
|
|
|
| |
llvm-svn: 63987
|
|
|
|
| |
llvm-svn: 63983
|
|
|
|
| |
llvm-svn: 63779
|
|
|
|
|
|
| |
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted.
llvm-svn: 63655
|
|
|
|
|
|
|
| |
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same.
Make a few style corrections as suggested by Chris.
llvm-svn: 63215
|
|
|
|
| |
llvm-svn: 63032
|
|
|
|
| |
llvm-svn: 62971
|
|
|
|
|
|
| |
pointed out by Doug.
llvm-svn: 62944
|
|
Add serialization support for ReferenceType.
llvm-svn: 62934
|