| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise &
or remove constant [-Wlogical-bitwise-confusion]
return x && 4;
^ ~
wording improvement suggestions are welcome.
llvm-svn: 108260
|
| |
|
|
| |
llvm-svn: 108257
|
| |
|
|
|
|
|
|
|
|
|
|
| |
size" error for code like
new (int [size])
to a warning, add a Fix-It to remove the parentheses, and make this
diagnostic work properly when it occurs in a template
instantiation. <rdar://problem/8018245>.
llvm-svn: 108242
|
| |
|
|
|
|
|
|
|
| |
expected value type. This is necessary as the builtin is internally represented
as only operating on integral types.
Also, add a FIXME to add support for floating point value types.
llvm-svn: 108002
|
| |
|
|
| |
llvm-svn: 108000
|
| |
|
|
|
|
| |
declarations.
llvm-svn: 107933
|
| |
|
|
|
|
|
|
|
|
|
|
| |
selector of an Objective-C method declaration, e.g., given
- (int)first:(int)x second:(int)y;
this code completion point triggers at the location of "second". It
will provide completions that fill out the method declaration for any
known method, anywhere in the translation unit.
llvm-svn: 107929
|
| |
|
|
|
|
| |
AST during the instantiation. Fixes PR7417!
llvm-svn: 107690
|
| |
|
|
|
|
| |
constructor-name lookup.
llvm-svn: 107536
|
| |
|
|
| |
llvm-svn: 107510
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
allows Sema some limited access to the current scope, which we only
use in one way: when Sema is performing some kind of declaration that
is not directly driven by the parser (e.g., due to template
instantiatio or lazy declaration of a member), we can find the Scope
associated with a DeclContext, if that DeclContext is still in the
process of being parsed.
Use this to make the implicit declaration of special member functions
in a C++ class more "scope-less", rather than using the NULL Scope hack.
llvm-svn: 107491
|
| |
|
|
|
|
| |
calls use that routine
llvm-svn: 107444
|
| |
|
|
|
|
| |
routine; no functionality change.
llvm-svn: 107434
|
| |
|
|
|
|
| |
method. No functionality change.
llvm-svn: 107415
|
| |
|
|
|
|
|
| |
separate function. Aside from making the loops infinitely faster, no
functionality change.
llvm-svn: 107407
|
| |
|
|
|
|
| |
into a separate routine. No functionality change.
llvm-svn: 107402
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aren't dropping all exception specifications on destructors, the
exception specifications on implicitly-declared destructors were
detected as being wrong (which they were).
Introduce logic to provide a proper exception-specification for
implicitly-declared destructors. This also fixes PR6972.
Note that the other implicitly-declared special member functions also
need to get exception-specifications. I'll deal with that in a
subsequent commit.
llvm-svn: 107385
|
| |
|
|
| |
llvm-svn: 107378
|
| |
|
|
|
|
| |
exception specification. Fixes PR7526.
llvm-svn: 107374
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameters starts at the end of the template-parameter rather than at
the point where the template parameter name is encounted. For example,
given:
typedef unsigned char T;
template<typename T = T> struct X0 { };
The "T" in the default argument refers to the typedef of "unsigned
char", rather than referring to the newly-introduced template type
parameter 'T'.
Addresses <rdar://problem/8122812>.
llvm-svn: 107354
|
| |
|
|
|
|
|
|
|
|
|
| |
type to an integral or enumeration type in the size of an array new
expression, e.g.,
new int[ConvertibleToInt(10)];
This is a GNU and C++0x extension.
llvm-svn: 107229
|
| |
|
|
|
|
|
|
| |
enumeration type out into a separate, reusable routine. The only
functionality change here is that we recover a little more
aggressively from ill-formed switch conditions.
llvm-svn: 107222
|
| |
|
|
|
|
|
|
|
| |
unimplemented property warning for properties
coming from class's conformin protocol. It also
simplifies the algorithm in the process.
Fixes radar 8035776.
llvm-svn: 107174
|
| |
|
|
|
|
|
|
| |
"std", with a warning, to improve GCC compatibility. Fixes PR7517.
As a drive-by, add typo correction for using directives.
llvm-svn: 107172
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is more targeted, as it simply provides toggle actions for the parser to
turn access checking on and off. We then use these to suppress access checking
only while we parse the template-id (included scope specifier) of an explicit
instantiation and explicit specialization of a class template. The
specialization behavior is an extension, as it seems likely a defect that the
standard did not exempt them as it does explicit instantiations.
This allows the very common practice of specializing trait classes to work for
private, internal types. This doesn't address instantiating or specializing
function templates, although those apparently already partially work.
The naming and style for the Action layer isn't my favorite, comments and
suggestions would be appreciated there.
llvm-svn: 106993
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
current attribute system, but it is enough to handle class templates which
specify parts of their alignment in terms of their template parameters.
This also replaces the attributes test in SemaTemplate with one that actually
tests working attributes instead of broken ones. I plan to add more tests here
for non-dependent attributes in a subsequent patch.
Thanks to John for walking me through some of this. =D
llvm-svn: 106818
|
| |
|
|
|
|
|
|
|
|
|
| |
(or operator-function-id) as a template, but the context is actually
non-dependent or the current instantiation, allow us to use knowledge
of what kind of template it is, e.g., type template vs. function
template, for further syntactic disambiguation. This allows us to
parse properly in the presence of stray "template" keywords, which is
necessary in C++0x and it's good recovery in C++98/03.
llvm-svn: 106167
|
| |
|
|
|
|
|
|
|
| |
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.
llvm-svn: 106161
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.
Propagate using shadow declarations around more effectively when looking up
template-ids. Reperform lookup for template-ids in member expressions so that
access control is properly set up.
Fix some number of latent bugs involving template-ids with totally invalid
base types. You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.
Fixes PR7384.
llvm-svn: 106093
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
being a subsequence of another standard conversion sequence. Instead
of requiring exact type equality for the second conversion step,
require type *similarity*, which is type equality with cv-qualifiers
removed at all levels. This appears to match the behavior of EDG and
VC++ (albeit not GCC), and feels more intuitive. Big thanks to John
for the line of reasoning that supports this change: since
cv-qualifiers are orthogonal to the second conversion step, we should
ignore them in the type comparison.
llvm-svn: 105678
|
| |
|
|
|
|
| |
appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules.
llvm-svn: 105593
|
| |
|
|
|
|
| |
constructor into an extension warning into the error that C++98 requires.
llvm-svn: 105529
|
| |
|
|
|
|
|
| |
or block-pointer type by removing the qualifiers parameter. Introduce a
method to perform semantic checking when adding qualifiers to a type.
llvm-svn: 105526
|
| |
|
|
| |
llvm-svn: 105525
|
| |
|
|
|
|
| |
This is never null, but the associated type might be.
llvm-svn: 105503
|
| |
|
|
| |
llvm-svn: 105484
|
| |
|
|
|
|
|
| |
was given. Remove some unnecessary accounting from BlockScopeInfo. Handle
typedef'ed function types until such time as we decide not.
llvm-svn: 105478
|
| |
|
|
|
|
|
| |
the case where we pick up block arguments from a typedef. Save the block
signature as it was written, and preserve same through PCH.
llvm-svn: 105466
|
| |
|
|
| |
llvm-svn: 105458
|
| |
|
|
|
|
|
|
|
| |
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.
llvm-svn: 105128
|
| |
|
|
| |
llvm-svn: 104991
|
| |
|
|
|
|
|
| |
message. This completion gives better results than just using the
"expression" completion, which is effectively what happened before.
llvm-svn: 104895
|
| |
|
|
|
|
| |
exposes less details.
llvm-svn: 104797
|
| |
|
|
|
|
| |
shares the stack with '#pragma pack', who knew!?
llvm-svn: 104786
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that is missing the 'template' keyword, e.g.,
t->getAs<T>()
where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.
This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:
test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
is required to treat 'getAs' as a dependent template name
t->getAs<T>();
^
template
This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.
llvm-svn: 104406
|
| |
|
|
|
|
| |
Fixes <rdar://problem/7987650>.
llvm-svn: 104376
|
| |
|
|
| |
llvm-svn: 104169
|
| |
|
|
|
|
|
|
|
| |
the same .cpp file as provided the definitions referenced these functions,
hiding the issue. However, they are clearly no longer inline. Let me know if
there is a reason to move their definitions to the header and make them truly
inline.
llvm-svn: 104104
|
| |
|
|
|
|
|
|
|
|
| |
of a current
design limitation in how we handle Objective-C class extensions. This was causing the CursorVisitor
to essentially visit an @property twice (once in the @interface, the other in the class extension).
Fixes <rdar://problem/7410145>.
llvm-svn: 104055
|
| |
|
|
|
|
|
|
|
| |
consider "super" as a candidate whenever we're parsing an expression
within an Objective-C method in an interface that has a superclass. At
some point, we'd like to give "super" a little edge over non-local
names; that will come later.
llvm-svn: 104022
|