| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
converting from std::nullptr_t, the subexpression might have side-effects.
llvm-svn: 154278
|
| |
|
|
|
|
|
|
| |
MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn't default to Error; otherwise MSVC headers won't parse.
Fixes PR12383.
llvm-svn: 154273
|
| |
|
|
| |
llvm-svn: 154270
|
| |
|
|
|
|
| |
reuse this function later.
llvm-svn: 154269
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The [class.protected] restriction is non-trivial for any instance
member, even if the access lacks an object (for example, if it's
a pointer-to-member constant). In this case, it is equivalent to
requiring the naming class to equal the context class.
- The [class.protected] restriction applies to accesses to constructors
and destructors. A protected constructor or destructor can only be
used to create or destroy a base subobject, as a direct result.
- Several places were dropping or misapplying object information.
The standard could really be much clearer about what the object type is
supposed to be in some of these accesses. Usually it's easy enough to
find a reasonable answer, but still, the standard makes a very confident
statement about accesses to instance members only being possible in
either pointer-to-member literals or member access expressions, which
just completely ignores concepts like constructor and destructor
calls, using declarations, unevaluated field references, etc.
llvm-svn: 154248
|
| |
|
|
|
|
|
|
| |
However, the '-x' option has special handling and wasn't following this
paradigm. Fix it to do so by claiming the arg as we parse the '-x' option.
rdar://11203340
llvm-svn: 154231
|
| |
|
|
|
|
|
|
|
|
|
| |
In a few cases clang emitted a rather content-free diagnostic: 'parse error'.
This change replaces two actual cases (template parameter parsing and K&R
parameter declaration parsing) with more specific diagnostics and removes a
third dead case of this in the BalancedDelimiterTracker (the ctor already
checked the invariant necessary to ensure that the diag::parse_error was never
actually used).
llvm-svn: 154224
|
| |
|
|
|
|
|
| |
template parameters of pointer, pointer-to-member, or nullptr_t
type in C++11. Fixes PR9700 / <rdar://problem/11193097>.
llvm-svn: 154219
|
| |
|
|
|
|
| |
dictionary literals. This concludes // rdar://10803676
llvm-svn: 154218
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when we generate a new ExplodedNode
we use the same Expr* as the one being currently visited. This is preparation for transitioning to having
ProgramPoints refer to CFGStmts.
This required a bit of trickery. We wish to keep the old Expr* bindings in the Environment intact,
as plenty of logic relies on it and there is no reason to change it, but we sometimes want the Stmt* for
the ProgramPoint to be different than the Expr* being used for bindings. This requires adding an extra
argument for some functions (e.g., evalLocation). This looks a bit strange for some clients, but
it will look a lot cleaner when were start using CFGStmt* in the appropriate places.
As some fallout, the diagnostics arrows are a bit difference, since some of the node locations have changed.
I have audited these, and they look reasonable.
llvm-svn: 154214
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is very hot, it is called when emitting diagnostics, in -E mode
and for many #pragma handlers. It scans through the whole source file to
count newlines, records and caches them in a vector.
The speedup from vectorization isn't very large, as we fall back to bytewise
scanning when we hit a newline. There might be a way to avoid leaving the sse
loop but everything I tried didn't work out because a call to push_back
clobbers xmm registers.
About 2% speedup on average on "clang -E > /dev/null" of all .cpp files in
clang's lib/Sema.
llvm-svn: 154204
|
| |
|
|
|
|
| |
64-bit targets.
llvm-svn: 154200
|
| |
|
|
|
|
| |
to a lockable type from error to warning.
llvm-svn: 154198
|
| |
|
|
|
|
| |
expressions. // rdar://10803676
llvm-svn: 154196
|
| |
|
|
|
|
| |
when compile for MIPS targets.
llvm-svn: 154195
|
| |
|
|
|
|
|
|
| |
valid ObjC objects.
Patch by Sean McBride!
llvm-svn: 154194
|
| |
|
|
|
|
|
|
|
| |
global destructor entry. For some reason this isn't enabled for
apple-kexts; it'd be good to have documentation for that.
Based on a patch by Nakamura Takumi!
llvm-svn: 154191
|
| |
|
|
| |
llvm-svn: 154190
|
| |
|
|
|
|
|
|
|
| |
the template instantiation of statement-expressions.
I think it was jyasskin who had a crashing testcase in this area;
hopefully this fixes it and he can find his testcase and check it in.
llvm-svn: 154189
|
| |
|
|
|
|
|
|
|
| |
root class is intentionally declared.
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>
llvm-svn: 154187
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inside of a sysroot targeting a system+sysroot which is "similar" or
"compatible" with the host system. This shows up when trying to build
system images on largely compatible hardware as-if fully cross compiled.
The problem is that previously we *perfectly* mimiced GCC here, and it
turns out GCC has a bug that no one has really stumbled across. GCC will
try to look in thy system prefix ('/usr/local' f.ex.) into which it is
instaled to find libraries installed along side GCC that should be
preferred to the base system libraries ('/usr' f.ex.). This seems not
unreasonable, but it has a very unfortunate consequence when combined
with a '--sysroot' which does *not* contain the GCC installation we're
using to complete the toolchain. That results in some of the host
system's library directories being searched during the link.
Now, it so happens that most folks doing stuff like this use
'--with-sysroot' and '--disable-multilib' when configuring GCC. Even
better, they're usually not cross-compiling to a target that is similar
to the host. As a result, searching the host for libraries doesn't
really matter -- most of the time weird directories get appended that
don't exist (no arm triple lib directory, etc). Even if you're
cross-compiling from 32-bit to 64-bit x86 or vice-versa, disabling
multilib makes it less likely that you'll actually find viable libraries
on the host. But that's just luck. We shouldn't rely on this, and this
patch disables looking in the system prefix containing the GCC
installation if that system prefix is *outside* of the sysroot. For
empty sysroots, this has no effect. Similarly, when using the GCC
*inside* of the sysroot, we still track wherever it is installed within
the sysroot and look there for libraries. But now we can use a cross
compiler GCC installation outside the system root, and only look for the
crtbegin.o in the GCC installation, and look for all the other libraries
inside the system root.
This should fix PR12478, allowing Clang to be used when building
a ChromiumOS image without polluting the image with libraries from the
host system.
llvm-svn: 154176
|
| |
|
|
| |
llvm-svn: 154175
|
| |
|
|
| |
llvm-svn: 154173
|
| |
|
|
|
|
|
|
|
|
|
| |
Based on Doug's feedback to r153887 this omits the FixIt if the following token
isn't syntactically valid for the context. (not a comma, '...', identifier,
'>', or '>>')
There's a bunch of work to handle the '>>' case, but it makes for a much more
pleasant diagnostic in this case.
llvm-svn: 154163
|
| |
|
|
|
|
| |
a namespace alias declaration.
llvm-svn: 154138
|
| |
|
|
|
|
| |
are duplicated via a typedef. Patch by Tim Northover.
llvm-svn: 154136
|
| |
|
|
|
|
| |
conditionals. Patch by Tim Northover.
llvm-svn: 154134
|
| |
|
|
|
|
|
| |
declared in its adopted protocol when another category declares it
because that category will implement it. // rdar://11186449
llvm-svn: 154132
|
| |
|
|
|
|
|
|
| |
synthesized ones. Reasonable debug info size reduction for objc.
rdar://11179756
llvm-svn: 154129
|
| |
|
|
|
|
| |
as a vector actually usable. Patch by David Neto. PR12465.
llvm-svn: 154128
|
| |
|
|
|
|
|
|
|
|
| |
change,
consolidate some commonly used category strings into global references (more of this can be done, I just did a few).
Fixes <rdar://problem/11191537>.
llvm-svn: 154121
|
| |
|
|
|
|
|
| |
to the base class MipsTargetInfoBase. These macros are applicable for both
32/64-bits targets.
llvm-svn: 154116
|
| |
|
|
|
|
| |
- Developers of system frameworks need a way for their framework to be treated as a "system framework" during development. Otherwise, they are unable to properly test how their framework behaves when installed because of the semantic changes (in warning behavior) applied to system frameworks.
llvm-svn: 154105
|
| |
|
|
|
|
|
|
| |
FrameworkMap items.
- No functionality change.
llvm-svn: 154104
|
| |
|
|
| |
llvm-svn: 154103
|
| |
|
|
|
|
|
|
| |
parameter.
Change suggested by Sebastian Redl on review feedback from r153887.
llvm-svn: 154102
|
| |
|
|
|
|
| |
understand.
llvm-svn: 154084
|
| |
|
|
|
|
| |
might not be a symbolic value.
llvm-svn: 154083
|
| |
|
|
|
|
| |
function definitions. Fixes <rdar://problem/11178609>.
llvm-svn: 154081
|
| |
|
|
|
|
|
| |
The ASTConsumer does not get deleted with clang --analyze (for
performance reasons), we still want the diagnostics to work.
llvm-svn: 154078
|
| |
|
|
|
|
|
| |
"No method actually called because receiver is nil" ->
"No method is called because receiver is nil"
llvm-svn: 154077
|
| |
|
|
| |
llvm-svn: 154075
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted
the former by 28-2 in our diagnostics.
* Fix the "use of member in static member function" diagnostic to correctly
detect this situation inside a block or lambda.
* Produce a more specific "invalid use of non-static member" diagnostic for
the case where a nested class member refers to a member of a
lexically-surrounding class.
llvm-svn: 154073
|
| |
|
|
|
|
|
|
|
|
| |
String literals (including unicode ones) can contain non-Unicode codepoints
if they were written using \x or similar. Write those out using \x, but be
careful that the following character can't be misinterpreted as part of the
\x escape sequence. Convert UTF-16 surrogate pairs back to codepoints before
rendering them.
llvm-svn: 154069
|
| |
|
|
|
|
|
| |
std::initializer_list<T> so long as <T> is known. This conversion has
identity rank.
llvm-svn: 154065
|
| |
|
|
|
|
| |
Review at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120402/055759.html
llvm-svn: 154064
|
| |
|
|
|
|
|
| |
enable neonfp on a CPU that doesn't support NEON.
rdar://11108618
llvm-svn: 154061
|
| |
|
|
| |
llvm-svn: 154056
|
| |
|
|
|
|
| |
or function with internal linkage as a non-type template argument.
llvm-svn: 154053
|
| |
|
|
| |
llvm-svn: 154052
|