overwriting the input file. For example,
clang -c foo.s -o foo.o -save-temps
Unfortunately, the original patch didn't compare the paths of the input and
output files. Thus, something like the following would fail to create foo.s.
cd /tmp/obj
clang -c ../src/foo.s -o foo.o -save-temps
rdar://11252615
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155224 91177308-0d34-0410-b5e6-96231b3b80d8
non-const reference parameter type if the class had any subobjects with deleted
copy constructors. This causes a rejects-valid if the class's copy constructor
is explicitly defaulted (as happens for some implementations of std::pair etc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155218 91177308-0d34-0410-b5e6-96231b3b80d8
up an elaborated type specifier in a friend declaration, only look for type
declarations, per [basic.lookup.elab]p2. If we know that the redeclaration
lookup for a friend class template in a dependent context finds a non-template,
don't delay the diagnostic to instantiation time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155187 91177308-0d34-0410-b5e6-96231b3b80d8
flags. We have preprocessed source, so we don't need these.
No test case as it's fairly difficult to make the compiler crash on demand. I'll
patiently wait for Ben to tell me how to do this in 2 lines of code. :)
rdar://11283560
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155180 91177308-0d34-0410-b5e6-96231b3b80d8
is issued on weak property as receiver and not on
any other use of a weak property. // rdar://10225276
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155169 91177308-0d34-0410-b5e6-96231b3b80d8
removing a (new) duplicate test whose only difference was the tag type
being an enum instead of a struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155165 91177308-0d34-0410-b5e6-96231b3b80d8
followed by an identifier as declaration specificer (except for ObjC).
This allows e.g. an out-of-line C++ member function definitions to be
recognized as functions and not as variable declarations if the type
name for the first parameter is not recognized as a type--say, when there
is a function name shadowing an enum type name and the parameter is
missing the "enum" keyword needed to distinguish the two.
Note that returning TPResult::Error() instead of TPResult::True()
appears to have the same end result, while TPResult::Ambiguous()
results in a crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155163 91177308-0d34-0410-b5e6-96231b3b80d8
we generate correct code for both strong and weak atomic compare-exchanges, even
though we don't propagate to the IR enough information to generate optimal weak
compare-exchanges on architectures which support them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155161 91177308-0d34-0410-b5e6-96231b3b80d8
which are checked in the parser, and analysis warnings that require the
full analysis. This allows attribute syntax to be checked independently
of the full thread safety analysis. Also introduces a new warning for the
case where a string is used as a lock expression; this allows the analysis
to gracefully handle expressions that would otherwise cause a parse error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155129 91177308-0d34-0410-b5e6-96231b3b80d8
This fixes the included testcase and lets us simplify the code a bit. It
does require using mergeWithMin when merging class information to its
members. Expand the comments to explain why that works.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155103 91177308-0d34-0410-b5e6-96231b3b80d8
an explicit default one. This means that with -fvisibility hidden we
now produce a hidden symbol for
template <typename T>
class DEFAULT foo {
void bar() {}
};
class zed {};
template class foo<zed>;
This matches the behaviour of gcc 4.7.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155102 91177308-0d34-0410-b5e6-96231b3b80d8
there is no need for mergeVisibily to ever increase the visibility. Not
doing so lets us replace an incorrect use of mergeVisibilityWithMin. The
testcase
struct HIDDEN RECT {
int top;
};
DEFAULT RECT foo = {0};
shows that we should give preference to one of the attributes instead of
keeping the minimum. We still get this testcase wrong because mergeVisibily
handles two explicit visibilities incorrectly, but this is a step in the
right direction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155101 91177308-0d34-0410-b5e6-96231b3b80d8
the current implementation this should be a nop as explicit visibility
takes precedence in mergeVisibility.
The location chosen is such that attributes checked above it can force
a symbol to be default. For example, an attribute is the variable or function.
Attributes checked after this point, can only make the visibility more
restrictive. An attribute in a type for example.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155098 91177308-0d34-0410-b5e6-96231b3b80d8
currently a nop as those users are the first merge or are a merge
of a hidden explicit visibility, which always wins in the current
implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155095 91177308-0d34-0410-b5e6-96231b3b80d8
into the wrong place when rewriting a static function
which declares block literals. // rdar://11275241
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155084 91177308-0d34-0410-b5e6-96231b3b80d8
specifications on member function templates of class templates and other such
nested beasties. Store the function template from which we are to instantiate
an exception specification rather than trying to deduce it. Plus some
additional test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155076 91177308-0d34-0410-b5e6-96231b3b80d8
r155047. See the LLVM log for the primary motivation:
http://llvm.org/viewvc/llvm-project?rev=155047&view=rev
Primary commit r154828:
- Several issues were raised in review, and fixed in subsequent
commits.
- Follow-up commits also reverted, and which should be folded into the
original before reposting:
- r154837: Re-add the 'undef BUILTIN' thing to fix the build.
- r154928: Fix build warnings, re-add (and correct) header and
license
- r154937: Typo fix.
Please resubmit this patch with the relevant LLVM resubmission.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155048 91177308-0d34-0410-b5e6-96231b3b80d8
Follow up to r154924: check that we are in a static CMethodDecl to enable the Microsoft bug emulation regarding access to protected member during PTM creation. Not just any static function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154982 91177308-0d34-0410-b5e6-96231b3b80d8