| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
constant value in this case as well.
llvm-svn: 219943
|
| |
|
|
| |
llvm-svn: 219942
|
| |
|
|
| |
llvm-svn: 219941
|
| |
|
|
| |
llvm-svn: 219940
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fix code to follow the "Don’t use else after a return" rule.
This is a followup from rL219792.
Reviewers: alexfh
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D5826
llvm-svn: 219939
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(also, the code executed once the element was found was split half
inside the loop and half after it - now put it all together after the
find operation)
I'm a bit concerned that this code is rather untested (commenting out
this whole function and running check-clang doesn't fail any tests)...
And I wish I had polymorphic lambdas.
llvm-svn: 219938
|
| |
|
|
|
|
|
|
| |
The final goal is to get rid of all the rest overloads that
accept LLVM objects (llvm::Function and llvm::GlobalVariable),
and pass in source-level entities instead.
llvm-svn: 219937
|
| |
|
|
| |
llvm-svn: 219935
|
| |
|
|
| |
llvm-svn: 219933
|
| |
|
|
|
|
| |
The test is a C++ semantic analysis test, move it to SemaCXX from Sema. NFC.
llvm-svn: 219932
|
| |
|
|
| |
llvm-svn: 219929
|
| |
|
|
|
|
| |
The ensures there is an explicit address space id in the output.
llvm-svn: 219928
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeFunction(aaaaaaaaaaaaaaaaa,
// comment.
ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa
: bbbbbbbbbbbbbbbbbbbb);
After:
SomeFunction(aaaaaaaaaaaaaaaaa,
// comment.
ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb);
llvm-svn: 219921
|
| |
|
|
|
|
|
|
|
|
| |
Before:
return (a)[foo bar : baz];
After:
return (a)[foo bar:baz];
llvm-svn: 219919
|
| |
|
|
| |
llvm-svn: 219903
|
| |
|
|
| |
llvm-svn: 219901
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference-ness, etc) for non-type template parameters
Plumb through the full QualType of the TemplateArgument::Declaration, as
it's insufficient to only know whether the type is a reference or
pointer (that was necessary for mangling, but insufficient for debug
info). This shouldn't increase the size of TemplateArgument as
TemplateArgument::Integer is still longer by another 32 bits.
Several bits of code were testing that the reference-ness of the
parameters matched, but this seemed to be insufficient (various other
features of the type could've mismatched and wouldn't've been caught)
and unnecessary, at least insofar as removing those tests didn't cause
anything to fail.
(Richard - perchaps you can hypothesize why any of these checks might
need to test reference-ness of the parameters (& explain why
reference-ness is part of the mangling - I would've figured that for the
reference-ness to be different, a prior template argument would have to
be different). I'd be happy to add them in/beef them up and add test
cases if there's a reason for them)
llvm-svn: 219900
|
| |
|
|
|
|
|
| |
Fix for clang crash when instantiating a template with qualified lookup for members in non-class types.
Differential Revision: http://reviews.llvm.org/D5769
llvm-svn: 219897
|
| |
|
|
|
|
|
|
|
|
| |
Separate out the non-nullable parameters from the nullable ones
(currently only the template template parameter) and demonstrate that
cv-qualifiers aren't preserved for non-null parameters (but are
preserved for null parameters) by adding 'const' to an int* non-type
template parameter.
llvm-svn: 219883
|
| |
|
|
| |
llvm-svn: 219880
|
| |
|
|
|
|
|
|
| |
The functionality contained in CodeGenFunction::EmitAlignmentAssumption has
been moved to IRBuilder (so that it can also be used by LLVM-level code).
Remove this now-duplicate implementation in favor of the IRBuilder code.
llvm-svn: 219877
|
| |
|
|
|
|
|
|
|
|
|
|
| |
CodeGen wouldn't mark the aliasee as thread_local if the aliasee was a
tentative definition.
Even if the definition was already emitted, it would never mark the
alias as thread_local.
This fixes PR21288.
llvm-svn: 219859
|
| |
|
|
|
|
|
|
| |
Soon we'll need to have access to blacklist before the CodeGen
phase (see http://reviews.llvm.org/D5687), so parse and construct
the blacklist earlier.
llvm-svn: 219857
|
| |
|
|
|
|
|
| |
This is fragile, as there are classes with the same name in both
namespaces (e.g. llvm::Module and clang::Module).
llvm-svn: 219855
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When performing a type deduction from the return type, the FunctionDecl may be
attributed with a calling convention. In such a case, the retrieved type
location may be an AttributedTypeLoc. Performing a castAs<FunctionProtoTypeLoc>
on such a type loc would result in an assertion as they are not derived types.
Ensure that we correctly handle the attributed type location by looking through
it to the modified type loc.
Fixes an assertion triggered in C++14 mode.
llvm-svn: 219851
|
| |
|
|
|
|
| |
Remove the use of an unnecessary function. NFC.
llvm-svn: 219850
|
| |
|
|
| |
llvm-svn: 219849
|
| |
|
|
|
|
|
|
| |
After http://reviews.llvm.org/D5687 is submitted, we will need
SanitizerBlacklist before the CodeGen phase, so make it a LangOpt
(as it will actually affect ABI / class layout).
llvm-svn: 219842
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This change moves SanitizerBlacklist.h from lib/CodeGen
to public Clang headers in include/clang/Basic. SanitizerBlacklist
is currently only used in CodeGen to decide which functions/modules
should be instrumented, but this will soon change as ASan will
optionally modify class layouts during AST construction
(http://reviews.llvm.org/D5687). We need blacklist machinery
to be available at this point.
llvm-svn: 219840
|
| |
|
|
|
|
| |
PPC64/NetBSD.
llvm-svn: 219839
|
| |
|
|
|
|
| |
Use switch for FreeBSD check to allow easier extension.
llvm-svn: 219838
|
| |
|
|
|
|
|
|
| |
return.
Forgot to add this in r219818.
llvm-svn: 219820
|
| |
|
|
|
|
|
|
| |
This silences:
../tools/clang/tools/libclang/CIndex.cpp:6451:3: warning: default label
in switch which covers all enumeration values [-Wcovered-switch-default]
llvm-svn: 219818
|
| |
|
|
|
|
|
|
| |
This reverts commit r219810.
The test suite appears broken.
llvm-svn: 219813
|
| |
|
|
|
|
| |
additional utilities are involved, e.g. 'env' utility that present in MSYS but is missing in MinGW. The patch unifies launch of "c++-analyzer" and "ccc-analyzer".
llvm-svn: 219812
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a second late template parser callback meant to cleanup any
resources allocated by late template parsing. Call it from the
Sema::ActOnEndOfTranslationUnit method after all pending template
instantiations have been completed. Teach Parser::ParseTopLevelDecl to
install the cleanup callback when incremental processing is enabled so
that Parser::TemplateIds can be freed.
Patch by Brad King!
llvm-svn: 219810
|
| |
|
|
|
|
| |
Patch by guibufolo!
llvm-svn: 219809
|
| |
|
|
|
|
| |
struct/union fields. This fixes PR20930.
llvm-svn: 219807
|
| |
|
|
|
|
|
|
| |
In particular, if you have two identical templates in different TUs in
anonymous namespaces, we would use the same global_ctors comdat key for
both. As a result, only one would be run.
llvm-svn: 219806
|
| |
|
|
|
|
| |
Remove some duplicated state, no functionality change intended.
llvm-svn: 219805
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The size of the ID field in CommandInfo was narrow, leading to potential
wrap-around of command IDs, causing misinterpretation later on.
The patch does the following:
- It extends the ID bitfield from 8 to 20 bits.
- It provides a DRY definition of the number of bits for the field to
avoid using literal numbers in different files.
- It introduces a new assertion that checks for the wrap-around.
- It adds the testcase from PR21254.
llvm-svn: 219802
|
| |
|
|
| |
llvm-svn: 219800
|
| |
|
|
| |
llvm-svn: 219797
|
| |
|
|
|
|
| |
Did a bit of drive-by reformatting as well since it required rearranging some other static functions in the file.
llvm-svn: 219795
|
| |
|
|
| |
llvm-svn: 219794
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Speed up hasName() matcher by skipping the expensive generation of the
fully qualified name unless we need it.
In the common case of matching an unqualified name, we don't need to
generate the full name. We might not even need to copy any string at
all.
This change speeds up our clang-tidy benchmark by ~10%
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D5776
llvm-svn: 219792
|
| |
|
|
| |
llvm-svn: 219787
|
| |
|
|
|
|
|
|
|
|
| |
Unions are initialized with the default initialization of their first
named member. If that member is not zero initialized, then we should
prefer that member's type. Otherwise, we might try to make an otherwise
unsuitable type (like an array) which we cannot easily initialize with a
pointer to member.
llvm-svn: 219781
|
| |
|
|
|
|
| |
No functionality change intended.
llvm-svn: 219780
|
| |
|
|
|
|
|
| |
We assumed the last argument of the copy constructor was the this
pointer. However, this is not the case under the MS ABI.
llvm-svn: 219775
|