Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161310 91177308-0d34-0410-b5e6-96231b3b80d8
PR13527: don't assert if a function is explicitly defaulted when it's already
been defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161315 91177308-0d34-0410-b5e6-96231b3b80d8
PR13499: Don't try to check whether 'override' has been validly applied until
we know whether the function is virtual. But check it as soon as we do know;
in some cases we don't need to wait for an instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161316 91177308-0d34-0410-b5e6-96231b3b80d8
PR13529: Don't crash if the driver sees an unused input file when running as
'clang-cpp'.

For now, the test uses "REQUIRES: shell" to determine if the host system
supports "ln -s", which it uses to create a 'clang-cpp' symlink. This is a bit
hacky and should likely be directly supported by lit.cfg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161317 91177308-0d34-0410-b5e6-96231b3b80d8
Re-enable pcmpistri/pcmpestri builtins in clang now that llvm supports them properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161319 91177308-0d34-0410-b5e6-96231b3b80d8
Comment diagnostics: \return in void function: specialize diagnostic text for
ObjC methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161324 91177308-0d34-0410-b5e6-96231b3b80d8
Comment diagnostics: warn on duplicate \brief and \return commands.

Doxygen manual claims that multiple \brief or \returns commands will be merged
together, but actual behavior is different (second \brief command becomes a
part of a discussion, second \returns becomes a "Returns: blah" paragraph on
its own).  Anyway, it seems to be a bad idea to use multiple \brief or \returns
commands in a single command.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161325 91177308-0d34-0410-b5e6-96231b3b80d8
Pull 'xcodebuild' wrapper logic into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161330 91177308-0d34-0410-b5e6-96231b3b80d8
Comment parser and sema: remove useless return values


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161331 91177308-0d34-0410-b5e6-96231b3b80d8
Fix MIPS DSP Rev1 intrinsics memory properties.
The patch reviewed by Akira Hatanaka.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161333 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Pass Tokens to Sema and store them in the AST.  No functional
change intended.  No test case as there's no real way to test at this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161342 91177308-0d34-0410-b5e6-96231b3b80d8
scan-build: factor out setting of environment variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161343 91177308-0d34-0410-b5e6-96231b3b80d8
For global record types, the self reference checker was called twice, resulting
in duplicate -Wuninitialized warnings.  Change so that only the check in
TryConstructorInitialization() will be used and a single warning be emitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161345 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Ignore OS X 10.8's annotations for NSMakeCollectable.

The frameworks correctly use the 'cf_consumed' and 'ns_returns_retained'
attributes for NSMakeCollectable, but we can model the behavior under
garbage collection more precisely than that.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161349 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Improve arrow locations for PseudoObjectExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161350 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add plist output checks for all four "path notes" tests.

No functionality change, but from now on, any new path notes should be
tested both with plain-text output (for ease of human auditing) and with
plist output (to ensure control flow and events are being correctly
represented in Xcode).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161351 91177308-0d34-0410-b5e6-96231b3b80d8
Comment AST: DeclInfo: collapse a bunch of boolean flags into an enum.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161352 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor checks for unevaluated contexts into a common utility function.

The one caller that's surrounded by nearby code manipulating the underlying
evaluation context list is left unmodified for readability.

Review by Sean Silva and Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161355 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add a checker to manage dynamic type propagation.

Instead of sprinkling dynamic type info propagation throughout
ExprEngine, the added checker would add the more precise type
information on known APIs (Ex: ObjC alloc, new) and propagate
the type info in other cases (ex: ObjC init method, casts (the second is
not implemented yet)).

Add handling of ObjC alloc, new and init to the checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161357 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Dynamic type info - propagate through implicit casts.

I currently have a bit of redundancy with the cast kind switch statement
inside the ImplicitCast callback, but I might be adding more casts going
forward.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161358 91177308-0d34-0410-b5e6-96231b3b80d8