| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The testcase in pr14929 shows that this is extremely hard to do. If we choose
to apply the attribute, that causes the visibility of some decls to change and
that can happen really late (during codegen).
Current gcc warns and ignores the attribute in this testcase with a warning.
This suggest that the correct solution is to find a point in the compilation
where we can compute the visibility and
* assert it was never computed before
* reject any attempts to compute it again in the future (with warnings).
llvm-svn: 172305
|
| |
|
|
|
|
| |
Thanks Eli Friedman for noticing it.
llvm-svn: 172292
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
which a particular declaration resides. Use this information to
customize the "definition of 'blah' must be imported from another
module" diagnostic with the module the user actually has to
import. Additionally, recover by importing that module, so we don't
complain about other names in that module.
Still TODO: coming up with decent Fix-Its for these cases, and expand
this recovery approach for other name lookup failures.
llvm-svn: 172290
|
| |
|
|
|
|
| |
an init list with multiple elements.
llvm-svn: 172285
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, -Wunused-comparison ignored comparisons in both macro bodies and
macro arguments, but we would still emit a -Wunused-value warning for either.
Now we correctly emit -Wunused-comparison for expressions in macro arguments.
Also, add isMacroBodyExpansion to SourceManager, to go along with
isMacroArgExpansion.
llvm-svn: 172279
|
| |
|
|
| |
llvm-svn: 172249
|
| |
|
|
|
|
|
| |
Before we were only checking if the new declaration itself was marked extern
C. Fixes prpr14766.
llvm-svn: 172243
|
| |
|
|
|
|
|
|
| |
Set invalid type of declarator after emitting error diagnostics,
so that it won't be later considered when instantiating the template.
Added test5_inst in test/SemaCXX/condition.cpp for non-regression.
llvm-svn: 172201
|
| |
|
|
|
|
| |
external declarations with C language linkage.
llvm-svn: 172150
|
| |
|
|
|
|
|
| |
Decl is a VarDecl.
Part of rdar://12991541
llvm-svn: 172120
|
| |
|
|
|
|
| |
// rdar://11577384
llvm-svn: 172102
|
| |
|
|
|
|
|
|
|
| |
in case condition type. // rdar://11577384.
Test is conditionalized on x86_64-apple triple as
I am not sure if the INT_MAX/LONG_MAX values in the test
will pass this test for other hosts.
llvm-svn: 172016
|
| |
|
|
|
|
|
|
|
|
| |
(because they are part of some module) but have not been made visible
(because they are in a submodule that wasn't imported), filter out
those declarations unless both the old declaration and the new
declaration have external linkage. When one or both has internal
linkage, there should be no conflict unless both are imported.
llvm-svn: 171925
|
| |
|
|
|
|
| |
in lambdas.
llvm-svn: 171921
|
| |
|
|
| |
llvm-svn: 171917
|
| |
|
|
| |
llvm-svn: 171915
|
| |
|
|
| |
llvm-svn: 171913
|
| |
|
|
|
|
|
|
| |
struct variables with flexiable array members in
blocks (and lambdas). Issue error instead of
crashing in IRGen. // rdar://12655829
llvm-svn: 171912
|
| |
|
|
| |
llvm-svn: 171906
|
| |
|
|
| |
llvm-svn: 171902
|
| |
|
|
| |
llvm-svn: 171899
|
| |
|
|
| |
llvm-svn: 171894
|
| |
|
|
|
|
| |
Thanks to Dmitri Gribenko for the suggestion.
llvm-svn: 171889
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the source
static void f();
static void f();
template<typename T>
static void g() {
f();
}
static void f() {
}
void h() {
g<int>();
}
the call to f refers to the second decl, but it is only marked used at the end
of the translation unit during instantiation, after the third f decl has been
linked in.
With this patch we mark all subsequent decls used, so that it is easy to check
if a symbol is used or not.
llvm-svn: 171888
|
| |
|
|
|
|
|
| |
attribute when determining whether we need to see an implementation of
a property. Fixes <rdar://problem/12958191>.
llvm-svn: 171877
|
| |
|
|
|
|
|
| |
The availability implies default visibility, so it can change the computed
visibility.
llvm-svn: 171840
|
| |
|
|
|
|
| |
Fixes <rdar://problem/12322000>.
llvm-svn: 171831
|
| |
|
|
|
|
|
| |
perform the semantic checks associated with the destruction of that temporary.
It'll be destroyed at the end of the constructor.
llvm-svn: 171818
|
| |
|
|
| |
llvm-svn: 171817
|
| |
|
|
|
|
| |
can create a VLA of class type. Fixes <rdar://problem/12151822>.
llvm-svn: 171783
|
| |
|
|
| |
llvm-svn: 171782
|
| |
|
|
|
|
| |
Patch by Nick Lewycky. Fixes pr8703.
llvm-svn: 171781
|
| |
|
|
|
|
|
| |
list of classes, etc., make sure to look into protocol
definitions. // rdar://12958878
llvm-svn: 171777
|
| |
|
|
|
|
|
|
|
|
| |
with respect to the lower "left-hand-side bitwidth" bits, even when negative);
see OpenCL spec 6.3j. This patch both implements this behaviour in the code
generator and "constant folding" bits of Sema, and also prevents tests
to detect undefinedness in terms of the weaker C99 or C++ specifications
from being applied.
llvm-svn: 171755
|
| |
|
|
|
|
|
|
| |
<objc/Protocol.h>. Caused by my recent changes for
various builtin declarations of objc_msgSendSuper
variety. // rdar://12489098
llvm-svn: 171638
|
| |
|
|
|
|
|
| |
to match those foung in objc.h an avoid spurious warnings.
// rdar://12489098
llvm-svn: 171492
|
| |
|
|
|
|
|
|
| |
To do so we have to wait until we know that the type of a variable has been
deduced. Sema::FinalizeDeclaration is the first callback that is used for
decl with or without initializers.
llvm-svn: 171458
|
| |
|
|
| |
llvm-svn: 171457
|
| |
|
|
| |
llvm-svn: 171402
|
| |
|
|
|
|
| |
nearby 'C++0x' comments.
llvm-svn: 171372
|
| |
|
|
| |
llvm-svn: 171367
|
| |
|
|
| |
llvm-svn: 171267
|
| |
|
|
| |
llvm-svn: 171263
|
| |
|
|
|
|
|
|
| |
This fixes pr14736. It is fairly ugly, but I don't think we can do much better
as we have to wait at least until the end of the typedef to know if the
function will have external linkage or not.
llvm-svn: 171240
|
| |
|
|
| |
llvm-svn: 171239
|
| |
|
|
| |
llvm-svn: 171238
|
| |
|
|
|
|
|
|
| |
This patch moves hasCLanguageLinkage to be VarDecl and FunctionDecl methods
so that they can be used from SemaOverload.cpp and then fixes the logic
in Sema::IsOverload.
llvm-svn: 171193
|
| |
|
|
|
|
| |
function is selected by overload resolution.
llvm-svn: 171190
|
| |
|
|
|
|
|
| |
The language linkage of redeclarations must match. GCC was already reporting
an error for this.
llvm-svn: 171139
|
| |
|
|
|
|
|
| |
Template instantiation can set the canonical decl to used after subsequent
decls have been chained, so we have to check that too.
llvm-svn: 171088
|