Revert r185229 as it breaks compilation of <windows.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185256 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: Push triple objects around instead of going to std::string all the time.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185261 91177308-0d34-0410-b5e6-96231b3b80d8
Compress pairs. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185264 91177308-0d34-0410-b5e6-96231b3b80d8
Add enumerators to TestVisitor::Language to allow visitor tests to
explicitly specify use of C++98 or C++11. Lang_CXX is preserved as
an alias for Lang_CXX98.

This does not add Lang_CXX1Y or Lang_C11, on the assumption that it's
better to add them if/when they are needed.

(This is a prerequisite for a test in a later patch for RecursiveASTVisitor.)

Reviewed by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185276 91177308-0d34-0410-b5e6-96231b3b80d8
Bug fix: Make RecursiveASTVisitor<T>::TraverseLambdaExpr call
WalkUpFromLambdaExpr, so that the Visit* functions are called
on that AST node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185277 91177308-0d34-0410-b5e6-96231b3b80d8
Lex: Cleanup whitespace in PragmaRegionHandler


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185280 91177308-0d34-0410-b5e6-96231b3b80d8
Reinstate r185229, reverted in r185256, with a tweak: further ignore the
standard's rule that an extern "C" declaration conflicts with any entity in the
global scope with the same name. Now we only care if the global scope entity is
a variable declaration (and so might have the same mangled name as the extern
"C" declaration). This has been reported as a standard defect.

Original commit message:

PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185281 91177308-0d34-0410-b5e6-96231b3b80d8
Teach -Wunsequenced that the side-effects of a function evaluation are sequenced
before the value computation of the result. In C, this is implied by there being
a sequence point after their evaluation, and in C++, it's implied by the
side-effects being sequenced before the expressions and statements in the
function body.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185282 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation cleanup: Mostly formatting \brief documentation, also fix a
typo or two.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185288 91177308-0d34-0410-b5e6-96231b3b80d8
Restore r184205 and associated commits (after commit of r185290)

This allows clang to use the backend parameter attribute 'returned' when generating 'this'-returning constructors and destructors in ARM and MSVC C++ ABIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185291 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation cleanup for TypeOrdering.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185293 91177308-0d34-0410-b5e6-96231b3b80d8
Put helper classes into anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185295 91177308-0d34-0410-b5e6-96231b3b80d8
Make string pointer const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185296 91177308-0d34-0410-b5e6-96231b3b80d8
Use static for helper functions instead of an anonymous namespace per coding standards.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185300 91177308-0d34-0410-b5e6-96231b3b80d8
Put helper classes in an anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185301 91177308-0d34-0410-b5e6-96231b3b80d8
Use LLVM_DELETED_FUNCTION on unimplemented copy constructor and assignment operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185302 91177308-0d34-0410-b5e6-96231b3b80d8
Put helper classes in an anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185303 91177308-0d34-0410-b5e6-96231b3b80d8
PR16502: Fix a dumb bug where we might look past the last initializer in an
InitListExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185304 91177308-0d34-0410-b5e6-96231b3b80d8
Put helper class in anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185305 91177308-0d34-0410-b5e6-96231b3b80d8
Put helper class in anonymous namespace.

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