| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
No functional change, just makes the error handling a bit more obvious.
llvm-svn: 191162
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Parsing cast expressions during error recovery can put us in a bad
state. Check to see if the token for a simple-type-specifier makes
sense before further parsing.
Fixes PR17255.
Reviewers: rsmith, doug.gregor, CornedBee, eli.friedman
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1696
llvm-svn: 191159
|
| |
|
|
|
|
| |
and protocols can be at global scope only.
llvm-svn: 191155
|
| |
|
|
|
|
|
|
|
|
| |
an additional conversion (other than a qualification conversion) would be
required after the explicit conversion.
Conversely, do allow explicit conversion functions to be used when initializing
a temporary for a reference binding in direct-list-initialization.
llvm-svn: 191150
|
| |
|
|
| |
llvm-svn: 191147
|
| |
|
|
|
|
|
|
| |
rather than a post-processing action, so we can support inserting these checks
at stages other than the end of the initialization. No functionality change
intended.
llvm-svn: 191146
|
| |
|
|
|
|
|
|
|
|
| |
Before:
size = sizeof * a;
After:
size = sizeof *a;
llvm-svn: 191139
|
| |
|
|
|
|
|
|
| |
A patch to AllocateTarget function to recognize llvm::Triple::NaCl for
MIPSEL and return NaClTargetInfo. Additional test has been added to check
if the expected macros get defined.
llvm-svn: 191124
|
| |
|
|
|
|
| |
PR17300.
llvm-svn: 191120
|
| |
|
|
|
|
|
| |
so the Index in/out parameters are pointless (always passed in as 0, always
ignored by the caller).
llvm-svn: 191103
|
| |
|
|
|
|
|
|
|
|
| |
This solves the problem of fallback onto ourselves if clang-cl
has been renamed to cl.exe and put on the PATH, as happens with
the VS integration.
Differential Revision: http://llvm-reviews.chandlerc.com/D1731
llvm-svn: 191099
|
| |
|
|
|
|
|
| |
Update the docs for -fms-extensions and -fms-compatibility to try to
clarify the difference between the two.
llvm-svn: 191095
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Apart from being more compact and already implemented, this also handles the
case where the parent is null. (It does also ignore all casts, not just
implicit ones, but this is more efficient to test and in the case we care
about---a message in a PseudoObjectExpr---there should only be implicit casts
anyway.
This should fix our internal buildbot.
llvm-svn: 191094
|
| |
|
|
|
|
|
|
|
|
| |
-fsanitize=address.
Instead add the ASan runtime to the linker command line so that only the ASan API functions can be undefined in the target library.
Fixes http://llvm.org/bugs/show_bug.cgi?id=17275
llvm-svn: 191076
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fields in the class. This allows a better checking of member intiailizers and
in class initializers in regards to initialization ordering.
For instance, this code will now produce warnings:
class A {
int x;
int y;
A() : x(y) {} // y is initialized after x, warn here
A(int): y(x) {} // default initialization of leaves x uninitialized, warn here
};
Several test cases were updated with -Wno-uninitialized to silence this warning.
llvm-svn: 191068
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable from being the function to being the enclosing namespace scope (in
C++) or the TU (in C). This allows us to fix a selection of related issues
where we would build incorrect redeclaration chains for such declarations, and
fail to notice type mismatches.
Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern,
which is only found when searching scopes, and not found when searching
DeclContexts. Such a declaration is only made visible in its DeclContext if
there are no non-LocalExtern declarations.
llvm-svn: 191064
|
| |
|
|
|
|
|
|
|
| |
_Bool in C, if the macro is defined. Also teach FixItUtils to look at whether
the macro was defined at the source location for which it is creating a fixit,
rather than looking at whether it's defined *now*. This is especially relevant
for analysis-based warnings which are delayed until end of TU.
llvm-svn: 191057
|
| |
|
|
|
|
|
|
| |
When -fms-extensions is enabled, the typo correction was being called here on
non-error paths (as in test/SemaTemplate/lookup-dependent-bases.cpp) and correct
compilation depended on Sema::CorrectTypo not finding a viable candidate.
llvm-svn: 191046
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When this flag is enabled, clang-cl falls back to cl.exe if it
cannot compile the code itself for some reason.
The idea is to use this to help build projects that almost compile
with clang-cl, except for some files that can then be built with
the fallback mechanism.
Differential Revision: http://llvm-reviews.chandlerc.com/D1711
llvm-svn: 191034
|
| |
|
|
|
|
| |
type in template instantiation).
llvm-svn: 191022
|
| |
|
|
|
|
| |
objc_returns_inner_pointer on properties. // rdar://14990439
llvm-svn: 191016
|
| |
|
|
|
|
|
|
|
|
| |
of ObjectiveC properties to mean annotation of
NS_RETURNS_INNER_POINTER on its synthesized getter.
This also facilitates more migration to properties when
methods are annotated with NS_RETURNS_INNER_POINTER.
// rdar://14990439
llvm-svn: 191009
|
| |
|
|
| |
llvm-svn: 191003
|
| |
|
|
|
|
| |
This is consistent with ICC and Intel's SHA-enabled GCC version.
llvm-svn: 191002
|
| |
|
|
| |
llvm-svn: 191001
|
| |
|
|
|
|
|
|
|
| |
Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is
enabled. SHA implies SSE2, which is needed for the __m128i type.
Also add the -msha/-mno-sha option.
llvm-svn: 190999
|
| |
|
|
| |
llvm-svn: 190984
|
| |
|
|
|
|
| |
readability.
llvm-svn: 190982
|
| |
|
|
|
|
|
|
|
| |
We don't really need to perform semantic analysis on the dependent expression
anyway, so just call the cast dependent.
<rdar://problem/15012610>
llvm-svn: 190981
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, Lex() would recurse whenever the current lexer changed (e.g.
upon entry into a macro). This patch turns the recursion into a loop: the
various lex routines now don't return a token when the current lexer changes,
and at the top level Preprocessor::Lex() now loops until it finds a token.
Normally, the recursion wouldn't end up being very deep, but the recursion depth
can explode in edge cases like a bunch of consecutive macros which expand to
nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this
patch).
<rdar://problem/14569770>
llvm-svn: 190980
|
| |
|
|
|
|
| |
Test that intrin.h at least parses in C++ TUs.
llvm-svn: 190978
|
| |
|
|
| |
llvm-svn: 190977
|
| |
|
|
|
|
| |
Patch by Eelis van der Weegen.
llvm-svn: 190971
|
| |
|
|
|
|
| |
defined with no initializer.
llvm-svn: 190970
|
| |
|
|
| |
llvm-svn: 190965
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I put in the warnings because MSVC has them, but I don't think they're very
useful.
Clang does not warn about overriding flags in general, e.g. it's perfectly
fine to have -fomit-frame-pointer followed by -fno-omit-frame-pointer.
We should focus on warning where things get confusing, such as with the
/TP and /TC options. In "clang-cl /TC a.c /TP b.cc", the user might not
realize that the /TP flag will apply to both files, and we warn about that.
Differential Revision: http://llvm-reviews.chandlerc.com/D1718
llvm-svn: 190964
|
| |
|
|
| |
llvm-svn: 190963
|
| |
|
|
| |
llvm-svn: 190962
|
| |
|
|
|
|
|
| |
This allows us to get rid of an ugly hack in the backend.
Paired commit with LLVM.
llvm-svn: 190960
|
| |
|
|
| |
llvm-svn: 190959
|
| |
|
|
|
|
|
|
| |
'instancetype' for known family of methods
with related result type; such as 'init'
methods. // rdar://14987948
llvm-svn: 190956
|
| |
|
|
|
|
|
|
|
|
|
| |
We now have symbols with floating-point type to make sure that
(double)x == (double)x comes out true, but we still can't do much with
these. For now, don't even bother trying to create a floating-point zero
value; just give up on conversion to bool.
PR14634, C++ edition.
llvm-svn: 190953
|
| |
|
|
|
|
|
| |
of methods annotated with attributes.
// rdar://14987909
llvm-svn: 190947
|
| |
|
|
|
|
|
| |
'deprecated' container before doing the 'instancetype'
inference.
llvm-svn: 190943
|
| |
|
|
|
|
| |
Patch by Bradley Smith!
llvm-svn: 190931
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for PR16752. Second commit.
PR16752: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width.
2. Fix handleModeAttr according to new methods in TargetInfo.
Fixes:
1st Commit (Done): Add new methods for TargetInfo:
getRealTypeByWidth and getIntTypeByWidth
for ASTContext names are almost same(invokes new methods from TargetInfo):
getIntTypeForBitwidth and getRealTypeForBitwidth
2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function.
Also test/Sema/attr-mode.c was fixed. 'XC' mode test was disabled for PPC64 machines.
llvm-svn: 190926
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.
C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.
llvm-svn: 190915
|
| |
|
|
|
|
| |
argument list, but could be instantiated with argument list of <>.
llvm-svn: 190913
|
| |
|
|
|
|
| |
PR17142.
llvm-svn: 190912
|
| |
|
|
| |
llvm-svn: 190911
|