Fix handling of "clang c:foo"

On windows, c:foo is a valid file path, but stat fails on just "c:". This
causes a problem for clang since its file manager wants to cache data about
the parent directory.

There are refactorings to be done in here, but this gives clang the correct
behavior and testing first.

Patch by Yunzhong Gao!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187359 91177308-0d34-0410-b5e6-96231b3b80d8
Convert a use of stat with sys::fs::status.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187364 91177308-0d34-0410-b5e6-96231b3b80d8
Support for Thread Safety Analysis in C

Patch by Ethan Jackson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187365 91177308-0d34-0410-b5e6-96231b3b80d8
test/Driver/cl.c, remove quotes around /help

The quotes (from r187330) didn't really help here, the trick was to disable
the test on MSYS builds. This removes those quotes, changes back the comment
to explain why /? has to be quoted specifically, and moves the REQUIRES
line to the top of the file because that's important.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187366 91177308-0d34-0410-b5e6-96231b3b80d8
Convert a use of status with llvm::sys::fs::getUniqueID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187367 91177308-0d34-0410-b5e6-96231b3b80d8
PR16715: Fix assert in verifier: only mark call to 'operator new' as 'builtin' if
corresponding 'operator new' was actually emitted as a function marked 'nobuiltin'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187374 91177308-0d34-0410-b5e6-96231b3b80d8
Make this test not try to write on object file and test all of the
output rather than just part of it.

Also, remove the frighteningly ancient comment about not working with
the gcc-driver. (!!!)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187376 91177308-0d34-0410-b5e6-96231b3b80d8
Update for llvm api change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187379 91177308-0d34-0410-b5e6-96231b3b80d8
Simplified SourceManager::translateLineCol a bit.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1183

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187386 91177308-0d34-0410-b5e6-96231b3b80d8
Remove assert header dependency in test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187387 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor some attributes to use checkFunctionOrMethodArgumentIndex instead of using custom logic.  No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187398 91177308-0d34-0410-b5e6-96231b3b80d8
err_attribute_not_string has been subsumed by err_attribute_argument_type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187400 91177308-0d34-0410-b5e6-96231b3b80d8
Added the notion of Type and TargetSpecific attributes to the clang tablegen.  In turn, this fixes a mistake with Ptr32, Ptr64, UPtr and SPtr attribtues generating AST nodes that are never actually used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187401 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Driver/qa_override.c: Resurrect a part of r187376. It still requires the feature 'clang-driver' for cygming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187405 91177308-0d34-0410-b5e6-96231b3b80d8
Add MicrosoftVFTableContext to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187409 91177308-0d34-0410-b5e6-96231b3b80d8
Replacing err_attribute_argument_not_int with err_attribute_not_type_attr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187419 91177308-0d34-0410-b5e6-96231b3b80d8
err_attribute_missing_parameter_name has been replaced by err_attribute_argument_type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187420 91177308-0d34-0410-b5e6-96231b3b80d8
Start keeping track of what work was done to detect a GCC installation
on the system, and report it when running the driver in verbose mode.
Without this it is essentially impossible to understand why a particular
GCC toolchain is used by Clang for libstdc++, libgcc, etc.

This also required threading a hook through the toolchain layers for
a specific toolchain implementation to print custom information under
'clang -v'. The naming here isn't spectacular. Suggestions welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187427 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve detection of templates.

Before:
  template <typename... Types>
        typename enable_if < 0<sizeof...(Types)>::type Foo() {}
After:
  template <typename... Types>
  typename enable_if<0 < sizeof...(Types)>::type Foo() {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187458 91177308-0d34-0410-b5e6-96231b3b80d8
Fix read of uninitialized enum value in test, caught by UBSan. No functionality
change, other than removal of undefined behavior.


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