Pretty Printer: Fix printing of conversion operator decls and calls.

- Don't emit anything when we encounter a call to a conversion operator.
    "bar(a & b)" instead of "bar(a & b.operator int())"
  This preserves the semantics and is still idempotent if we print the AST multiple times.

- Properly print declarations of conversion operators.
    "explicit operator bool();" instead of "bool operator _Bool();"

PR18776.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202170 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Pretty Printer: Fix printing of conversion operator decls and calls."

This reverts commit r202167.

It broke Analysis/auto-obj-dtors-cfg-output.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202173 91177308-0d34-0410-b5e6-96231b3b80d8
Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."

There were many additional tests that had the bad behavior baked in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202174 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Just use getTypeInfoInChars to get the field size

This was changed to use manual desugaring and multiplication in r201832
and fixed for multi-dimensional arrays in r201917.  However, it breaks
down in the presence of typedefs.  Rather than attempting to handle all
the desugaring, just go back to calling the generic type info code.

This was discovered while compiling SIInstrWaits.cpp in the R600
backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202175 91177308-0d34-0410-b5e6-96231b3b80d8
Add a driver option -ivfsoverlay

Reads the description of a virtual filesystem from a file and overlays
it over the real file system.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202176 91177308-0d34-0410-b5e6-96231b3b80d8
Give sparcv9 the ability to set the target cpu. Change it from accepting
-march which doesnt exist on sparc gcc to -mcpu. While here adjust a
few tests to not write an unused temporary file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202177 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: use -fno-rtti by default

Generating RTTI in the MS ABI is currently not supported, and the failures
are confusing to users, so let's disable it by default for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202178 91177308-0d34-0410-b5e6-96231b3b80d8
Pass the sparc architecture variant to the assembler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202179 91177308-0d34-0410-b5e6-96231b3b80d8
Pretty Printer: Print constexpr and ref qualifiers. Don't print return types on destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202181 91177308-0d34-0410-b5e6-96231b3b80d8
Add preprocessed output to ccc-analyzer's accepted language map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202182 91177308-0d34-0410-b5e6-96231b3b80d8
Debug info: Generate debug info for variadic functions.
Paired commit with LLVM.

rdar://problem/13690847

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202185 91177308-0d34-0410-b5e6-96231b3b80d8
Hoist culling of -Wunreachable-code from headers before we even run the analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202200 91177308-0d34-0410-b5e6-96231b3b80d8
Address review comments for r202185, no functionality changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202208 91177308-0d34-0410-b5e6-96231b3b80d8
Add -Wabsolute-value, warnings about absolute value functions.

The warnings fall into three groups.
1) Using an absolute value function of the wrong type, for instance, using the
int absolute value function when the argument is a floating point type.
2) Using the improper sized absolute value function, for instance, using abs
when the argument is a long long.  llabs should be used instead.

From these two cases, an implicit conversion will occur which may cause
unexpected behavior.  Where possible, suggest the proper absolute value
function to use, and which header to include if the function is not available.

3) Taking the absolute value of an unsigned value.  In addition to this warning,
suggest to remove the function call.  This usually indicates a logic error
since the programmer assumed negative values would have been possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202211 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] NonNullParamChecker: don't freak out about nested transparent_unions.

For now, just ignore them. Later, we could try looking through LazyCompoundVals,
but we at least shouldn't crash.

<rdar://problem/16153464>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202212 91177308-0d34-0410-b5e6-96231b3b80d8
PR16074, implement warnings to catch pointer to boolean true and pointer to
null comparison when the pointer is known to be non-null.

This catches the array to pointer decay, function to pointer decay and
address of variables.  This does not catch address of function since this
has been previously used to silence a warning.

Pointer to bool conversion is under -Wbool-conversion.
Pointer to null comparison is under -Wtautological-pointer-compare, a sub-group
of -Wtautological-compare.

void foo() {
  int arr[5];
  int x;
  // warn on these conditionals
  if (foo);
  if (arr);
  if (&x);
  if (foo == null);
  if (arr == null);
  if (&x == null);

  if (&foo);  // no warning
}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202216 91177308-0d34-0410-b5e6-96231b3b80d8
80-col and bad line ending fixups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202219 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/CodeGenCXX/debug-info-varargs.cpp: Appease msvc with %itanium_abi_triple.

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