| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This fixes PR 8738, 9060 and 9132.
llvm-svn: 126069
|
| |
|
|
|
|
| |
correct and is not worth fixing. Fixes PR8396.
llvm-svn: 126035
|
| |
|
|
|
|
|
| |
own weird little DenseMap. Hey look, we now emit unused label
warnings deterministically, amazing.
llvm-svn: 125813
|
| |
|
|
|
|
|
|
|
|
| |
making them be template instantiated in a more normal way and
make them handle attributes like other decls.
This fixes the used/unused label handling stuff, making it use
the same infrastructure as other decls.
llvm-svn: 125771
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.
This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.
This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.
Review appreciated, particularly for the cindex and template bits.
llvm-svn: 125733
|
| |
|
|
| |
llvm-svn: 125399
|
| |
|
|
| |
llvm-svn: 125216
|
| |
|
|
|
|
|
|
| |
instead from the Scope; Inner scopes in bodies don't have DeclContexts associated with them.
Fixes http://llvm.org/PR9160 & rdar://problem/8966163.
llvm-svn: 125097
|
| |
|
|
|
|
|
| |
in liu of a class method getter.
// rdar://8962253
llvm-svn: 125094
|
| |
|
|
|
|
|
|
|
| |
say "out-of-line definition differ from the declaration in the return type" instead of
the silly "functions that differ only in their return type cannot be overloaded".
Addresses rdar://7980179.
llvm-svn: 124939
|
| |
|
|
| |
llvm-svn: 124863
|
| |
|
|
|
|
| |
[temp.param]p9 and C++ DR226. Fixes PR8747.
llvm-svn: 124856
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The difference with gcc is that it warns if you overload virtual methods only if
the method doesn't also override any method. This is to cut down on the number of warnings
and make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.
If we want to warn that not all overloads are overriden we can have an additional
warning like -Wpartial-override.
-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.
llvm-svn: 124805
|
| |
|
|
|
|
|
|
| |
extremely rambunctious, both on parsing and on template instantiation.
Calm it down, fixing an internal consistency assert on anonymous enum
instantiation manglings.
llvm-svn: 124653
|
| |
|
|
|
|
| |
Fixes rdar://8900456.
llvm-svn: 124581
|
| |
|
|
|
|
| |
exists a locally scoped extern with the same name.
llvm-svn: 124580
|
| |
|
|
| |
llvm-svn: 124579
|
| |
|
|
|
|
| |
rdar://8883302.
llvm-svn: 124578
|
| |
|
|
| |
llvm-svn: 124276
|
| |
|
|
|
|
| |
Wennborg! Fixes PR8295.
llvm-svn: 124135
|
| |
|
|
| |
llvm-svn: 124122
|
| |
|
|
| |
llvm-svn: 124087
|
| |
|
|
|
|
|
|
|
|
| |
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.
llvm-svn: 124072
|
| |
|
|
|
|
| |
used as a base.
llvm-svn: 124039
|
| |
|
|
| |
llvm-svn: 124031
|
| |
|
|
|
|
|
| |
This allows us to simplify the handling for the overloadable attribute,
removing a number of FIXMEs.
llvm-svn: 123961
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inheritable attributes on declarations may be inherited by any later
redeclaration at merge time. By contrast, a non-inheritable attribute
will not be inherited by later redeclarations. Non-inheritable
attributes may be semantically analysed early, allowing them to
influence the redeclaration/overloading process.
Before this change, the "overloadable" attribute received special
handling to be treated as non-inheritable, while all other attributes
were treated as inheritable. This patch generalises the concept,
while removing a FIXME. Some CUDA location attributes are also marked
as non-inheritable in order to support special overloading semantics
(to be introduced in a later patch).
The patch introduces a new Attr subclass, InheritableAttr, from
which all inheritable attributes derive. Non-inheritable attributes
simply derive from Attr.
N.B. I did not review every attribute to determine whether it should
be marked non-inheritable. This can be done later on an incremental
basis, as this change does not affect default functionality.
llvm-svn: 123959
|
| |
|
|
| |
llvm-svn: 123916
|
| |
|
|
|
|
| |
virtual member functions.
llvm-svn: 123888
|
| |
|
|
|
|
|
| |
failed to find a case where an enum context would make a difference, but
found PR9007 on the way.
llvm-svn: 123871
|
| |
|
|
|
|
|
| |
there's a respectable point of instantiation. Also, make sure we do
this operation even when instantiating a dependently-typed variable.
llvm-svn: 123818
|
| |
|
|
|
|
| |
thousand other things which were (generally inadvertantly) relying on that.
llvm-svn: 123814
|
| |
|
|
| |
llvm-svn: 123236
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Declaration of function parameter packs
2) Instantiation of function parameter packs within function types.
3) Template argument deduction of function parameter packs when
matching two function types.
We're missing all of the important template-instantiation logic for
function template definitions, along with template argument deduction
from the argument list of a function call, so don't even think of
trying to use these for real yet.
llvm-svn: 122926
|
| |
|
|
| |
llvm-svn: 122781
|
| |
|
|
|
|
|
| |
contexts. This prevents -Wunused-function from firing on friend function
definitions inside of class templates for example.
llvm-svn: 122763
|
| |
|
|
|
|
|
|
|
| |
don't have access to (e.g., fprintf, which needs the library type
FILE), fail with a warning and forget about the builtin
entirely. Previously, we would actually provide an error, which breaks
autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316.
llvm-svn: 122744
|
| |
|
|
| |
llvm-svn: 122670
|
| |
|
|
|
|
|
| |
on array and function declarators. This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.
llvm-svn: 122535
|
| |
|
|
|
|
|
|
|
|
|
|
| |
parameter packs (C++0x [dcl.fct]p13), including disambiguation between
unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for
cases like
void f(T...)
where T may or may not contain unexpanded parameter packs.
llvm-svn: 122520
|
| |
|
|
|
|
|
|
|
| |
new gcc warning that complains on self-assignments and
self-initializations. Fix one bug found by the warning, in which one
clang::OverloadCandidate constructor failed to initialize its
FunctionTemplate member.
llvm-svn: 122459
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inconsistent with the type that the builtin *should* have, forget
about the builtin altogether: we don't want subsequence analyses,
CodeGen, etc., to think that we have a proper builtin function.
C is protected from errors here because it allows one to use a
library builtin without having a declaration, and detects inconsistent
(re-)declarations of builtins during declaration merging. C++ was
unprotected, and therefore would crash.
Fixes PR8839.
llvm-svn: 122351
|
| |
|
|
|
|
|
| |
Apply the noreturn attribute while creating a builtin function's type.
Remove the getNoReturnType() API.
llvm-svn: 122295
|
| |
|
|
| |
llvm-svn: 122162
|
| |
|
|
| |
llvm-svn: 122058
|
| |
|
|
| |
llvm-svn: 122056
|
| |
|
|
| |
llvm-svn: 121938
|
| |
|
|
| |
llvm-svn: 121934
|
| |
|
|
|
|
|
| |
drive-by, make sure to check for unexpanded parameter packs within the
name of a declaration.
llvm-svn: 121930
|
| |
|
|
| |
llvm-svn: 121928
|