| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 140478
|
| |
|
|
|
|
|
|
|
|
|
| |
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: 140407
|
| |
|
|
|
|
|
|
| |
the key function is inline, rather than the original
declaration. Perhaps FunctionDecl::isInlined() is poorly named. Fixes
<rdar://problem/9979458>.
llvm-svn: 140400
|
| |
|
|
| |
llvm-svn: 140367
|
| |
|
|
|
|
| |
constructor template. Fixes PR10457.
llvm-svn: 140350
|
| |
|
|
|
|
|
|
| |
generation when we're dealing with an implicitly-defined copy or move
constructor. And, actually set the implicitly-defined bit for
implicitly-defined constructors and destructors. Should fix self-host.
llvm-svn: 140334
|
| |
|
|
| |
llvm-svn: 140293
|
| |
|
|
| |
llvm-svn: 140268
|
| |
|
|
|
|
| |
Dyatkovskiy! Fixes PR10896.
llvm-svn: 140250
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of false positive warnings that depend on noreturn destructors pruning
the CFGs, but only in C++0x mode!
This was really surprising as the debugger quickly reveals that the
attributes are parsed correctly (and using the same code) in both modes.
The warning fires in the same way in both modes. But between parsing and
building the destructor declaration with the noreturn attribute and the
warning, it magically disappears. The key? The 'noexcept' appears!
When we were rebuilding the destructor type with the computed implicit
noexcept we completely dropped the old type on the floor. This almost
makes sense (as the arguments and return type to a destructor aren't
exactly unpredictable), but lost any function type attributes as well.
The fix is simple, we build the new type off of the old one rather than
starting fresh.
Testing this is a bit awkward. I've done it by running the
noreturn-sensitive tests in both modes, which previous failed and now
passes, but if anyone has ideas about how to more specifically and
thoroughly test that the extended info on a destructor is preserved when
adding noexcept, I'm all ears.
llvm-svn: 140138
|
| |
|
|
| |
llvm-svn: 140017
|
| |
|
|
|
|
| |
anonymous structs contained within anonymous unions.
llvm-svn: 140015
|
| |
|
|
|
|
| |
bringing this to my attention.
llvm-svn: 140013
|
| |
|
|
|
|
|
|
|
| |
Prior to C++11, this
has no effect since any such destructors must be trivial, and in C++11 such destructors must not
be called.
llvm-svn: 139997
|
| |
|
|
|
|
|
|
| |
constructors if no
mem-initializer is specified for them, unless an in-class initializer is specified.
llvm-svn: 139996
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
must also be present of the first declaration of that entity.
llvm-svn: 139384
|
| |
|
|
|
|
| |
CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs.
llvm-svn: 139350
|
| |
|
|
|
|
|
| |
indicates that a declaration is only visible within the module it is
declared in.
llvm-svn: 139348
|
| |
|
|
| |
llvm-svn: 139347
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
synthesized move assignment within an implicitly-defined move
assignment operator, be sure to treat the derived-to-base cast as an
xvalue (rather than an lvalue). Otherwise, we'll end up getting the
wrong constructor.
Optimize a direct call to a trivial move assignment operator to an
aggregate copy, as we do for trivial copy assignment operators, and
update the the assertion in CodeGenFunction::EmitAggregateCopy() to
cope with this optimization.
Fixes PR10860.
llvm-svn: 139143
|
| |
|
|
|
|
|
|
| |
Fix bug this uncovered.
Address minor comments from Doug.
Enable cxx_implicit_moves feature.
llvm-svn: 139101
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
well.
Also, clean up the flow of the code a bit, and factor things more
nicely.
Finally, add the test case that was missing from my previous
commit (sorry), with new tests added to cover temporaries and other fun
cases.
llvm-svn: 139077
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference members of classes. We've had several bugs reported because of
this, and there's no reason not to flag it right away in the compiler.
Comments especially welcome on the strategy for implementing this
warning (IE, what should trigger this?) and on the text of the warning
itself.
I'm going to extend this to cover obvious cases with temporaries and
beef up the test cases some in subsequent patches. I'll then run it over
a large codebase and make sure its not misbehaving before I add it to
-Wall or turn it on by default. I think this one might be a good
candidate for on by default.
llvm-svn: 139075
|
| |
|
|
|
|
|
|
| |
semantic analysis when taking the address of an xvalue. Instead, just
build the unary operator directly, since it's safe to do so (from the
IRgen and AST perspectives) for any glvalue. Fixes PR10822.
llvm-svn: 138935
|
| |
|
|
|
|
|
|
|
| |
collision between C99 hexfloats and C++0x user-defined literals by
giving C99 hexfloats precedence. Also, warning about user-defined
literals that conflict with hexfloats and those that have names that
are reserved by the implementation. Fixes <rdar://problem/9940194>.
llvm-svn: 138839
|
| |
|
|
|
|
|
|
|
| |
This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.
llvm-svn: 138821
|
| |
|
|
| |
llvm-svn: 137653
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.
Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};
This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.
llvm-svn: 137573
|
| |
|
|
|
|
|
| |
special member function, make sure to classify an explicitly-defaulted
copy constructor as a "copy" operation. Fixes PR10622.
llvm-svn: 137219
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
constructor. Previously, we did some bogus recursion into the fields
of anonymous structs (recursively), which ended up building invalid
ASTs that would cause CodeGen to crash due to invalid GEPs.
Now, we instead build the default initializations based on the
indirect field declarations at the top level, which properly generates
the sequence of GEPs needed to initialize the proper member. Fixes
PR10512 and <rdar://problem/9924046>.
llvm-svn: 137212
|
| |
|
|
|
|
|
| |
Use the the path that generates a loop. This fixes
bogus error that clang puts out. // rdar://9894548
llvm-svn: 137080
|
| |
|
|
|
|
|
|
| |
completely broken deserialization mapping code we had for VTableUses,
which would have broken horribly as soon as our local-to-global ID
mapping became interesting.
llvm-svn: 136371
|
| |
|
|
| |
llvm-svn: 136273
|
| |
|
|
|
|
|
|
| |
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.
llvm-svn: 135914
|
| |
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
| |
|
|
| |
llvm-svn: 135668
|
| |
|
|
|
|
| |
access specifier as public.
llvm-svn: 135649
|
| |
|
|
|
|
| |
non-value-dependent cases.
llvm-svn: 135543
|
| |
|
|
|
|
|
| |
unrestricted unions, which ended up attempting to initialize objects
in a union (which CodeGen isn't prepared for). Fixes PR9683.
llvm-svn: 135027
|
| |
|
|
|
|
|
| |
implicit ivar accesses to go through the 'self' variable
rather than the real 'self' for the method. // rdar://9730771
llvm-svn: 134992
|
| |
|
|
| |
llvm-svn: 134892
|
| |
|
|
|
|
|
| |
declaration with dependent type. Fixes PR10232 /
<rdar://problem/9700653>.
llvm-svn: 134515
|
| |
|
|
|
|
| |
ActOnDeclarator can return NULL. Fixes PR10270, from Hans Wennborg!
llvm-svn: 134416
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vector<int>
to
std::vector<int>
Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.
Thanks Kaelyn!
llvm-svn: 134007
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 133984
|
| |
|
|
|
|
|
|
| |
When performing semantic analysis on a member declaration, fix the check for whether we are declaring a function to check for parenthesized declarators, declaration via decltype, etc.
Also fix the semantic check to not treat FuncType* as a function type.
llvm-svn: 133862
|
| |
|
|
|
|
| |
in fragile abi mode and some other cleanups. // rdar://8940528
llvm-svn: 133747
|
| |
|
|
|
|
| |
in Darwin's fragile abi mode. // rdar://8940528
llvm-svn: 133639
|