Revert r218925 - "Patch to warn if 'override' is missing"

This CL has caused bootstrap failures on Linux and OSX buildbots running with -Werror.

Example report from http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/13183/steps/bootstrap%20clang/logs/stdio:

================================================================
[ 91%] Building CXX object tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/ShowEnabledWarnings.cpp.o
In file included from /home/dtoolsbot/build/sanitizer-x86_64-linux/build/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp:20:
In file included from /home/dtoolsbot/build/sanitizer-x86_64-linux/build/llvm/lib/Target/R600/SIISelLowering.h:19:
/home/dtoolsbot/build/sanitizer-x86_64-linux/build/llvm/lib/Target/R600/SIInstrInfo.h:71:8: error: 'getLdStBaseRegImmOfs' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
  bool getLdStBaseRegImmOfs(MachineInstr *LdSt,
       ^
/home/dtoolsbot/build/sanitizer-x86_64-linux/build/llvm/include/llvm/Target/TargetInstrInfo.h:815:16: note: overridden virtual function is here
  virtual bool getLdStBaseRegImmOfs(MachineInstr *LdSt,
               ^
================================================================



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218969 91177308-0d34-0410-b5e6-96231b3b80d8
Revert changes in r218863, r218864

Summary: The changes introduced in the above two commits are giving
a rough time to one of the build bots. Reverting the changes for the
moment so that the bot can go green again.

Change-Id: Id19f6cb2a8bc292631fac2262268927563d820c2

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218970 91177308-0d34-0410-b5e6-96231b3b80d8
[sphinx clean up] Fix warning introduced by r218957

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218983 91177308-0d34-0410-b5e6-96231b3b80d8
constexpr evaluation for __builtin_assume_aligned

Richard noted in the review of r217349 that extra handling of
__builtin_assume_aligned inside of the expression evaluator was needed. He was
right, and this should address the concerns raised, namely:

 1. The offset argument to __builtin_assume_aligned can have side effects, and
    we need to make sure that all arguments are properly evaluated.

 2. If the alignment assumption does not hold, that introduces undefined
    behavior, and undefined behavior cannot appear inside a constexpr.

and hopefully the diagnostics produced are detailed enough to explain what is
going on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218992 91177308-0d34-0410-b5e6-96231b3b80d8
Add comment about separators must match in
version numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218993 91177308-0d34-0410-b5e6-96231b3b80d8
Add getOpenMPSimdDefaultAlignment for PowerPC

When the aligned clause of an OpenMP simd pragma is not provided with an
explicit alignment, a target-dependent default must be used. This adds such a
default of PPC targets.

This will become slightly more complicated when BG/Q support is added (because
then it will depend on the type). For now, 16 is a correct value for all
systems, and covers Altivec and VSX vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218994 91177308-0d34-0410-b5e6-96231b3b80d8
Format: ArrayRefize some implicit copies away.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219000 91177308-0d34-0410-b5e6-96231b3b80d8
ASTUnit: Replace out parameter with return value, we have NRVO for this.

And elide the copy when pushing the return value into a vector. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219001 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Revert "DI: LLVM schema change: fold constants into string""

This reverts commit r218917, effectively reapplying r218913.  Original
commit message follows.

--

Update debug info testcases for an LLVM metadata schema change to fold
metadata constant operands into a single `MDString`.

Part of PR17891.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219011 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Assortment of improvements pretty printing
objective-C declarations, including printing of availability
attributes on methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219013 91177308-0d34-0410-b5e6-96231b3b80d8
Initialize MCObjectFileInfo when parsing ms-style asm.

Otherwise we're left with an half-initialized bag of variables that may or may
not explode later on. Should bring the MSVC buildbot back to life.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219023 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Make CStringChecker correctly calculate return value of mempcpy

The return value of mempcpy is only correct when the destination type is
one byte in size. This patch casts the argument to a char* so the
calculation is also correct for structs, ints etc.

A patch by Daniel Fahlgren!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219024 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Make Malloc Checker track memory allocated by if_nameindex

The MallocChecker does currently not track the memory allocated by
if_nameindex. That memory is dynamically allocated and should be freed
by calling if_freenameindex. The attached patch teaches the checker
about these functions.

Memory allocated by if_nameindex is treated as a separate allocation
"family". That way the checker can verify it is freed by the correct
function.

A patch by Daniel Fahlgren!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219025 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Refactor and cleanup IsCompleteType
There are three copies of IsCompleteType(...) functions in CSA and all
of them are incomplete (I experienced  crashes in some CSA's test cases).
I have replaced these function calls with Type::isIncompleteType() calls.

A patch by Aleksei Sidorin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219026 91177308-0d34-0410-b5e6-96231b3b80d8
CFE Knob for: Add a thread-model knob for lowering atomics on baremetal & single threaded systems

http://reviews.llvm.org/D4985


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219027 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress defined-but-unused warnings

by adding a fake use


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219029 91177308-0d34-0410-b5e6-96231b3b80d8
test: Disable standard system includes in %clang_cc1

This adds -nostdsysteminc to the %clang_cc1 expansion, which should
make it harder to accidentally write tests that depend on headers in
/usr/include. It also updates a few tests that use -isysroot <x> and a
darwin triple to omit the triple and use -isystem <x>/usr/include
instead, making them a little bit more general.

Incidentally, this fixes a test failure I'm seeing on darwin in
Modules/stddef.c, that happens because my system finds a stddef.h in
/usr/include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219030 91177308-0d34-0410-b5e6-96231b3b80d8
Remove stray enum keywords. MSVC sees this as a redeclaration at global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219031 91177308-0d34-0410-b5e6-96231b3b80d8
PR20991: ::decltype is not valid.


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

Use getDLLAttr to factor out some common dllimport/dllexport code.

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