PR19254: If a thread_local data member of a class is accessed via member access
syntax, don't forget to run its initializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204869 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix arm bots by removing a superfluous __cdecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204872 91177308-0d34-0410-b5e6-96231b3b80d8
Just call getContextDescriptor to get the context for subprograms
instead of rolling an inefficient version of the function. This
changes some order of emission of metadata nodes, fix up those
testcases and make them more flexible to some changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204874 91177308-0d34-0410-b5e6-96231b3b80d8
MS asm: Filter out fpsw clobbers

When parsing MS inline assembly, we note that fpsw is an implicit def of
most x87 FP operations, and add it to the clobber list.  However, we
don't recognize fpsw as a gcc register name, and we assert.  Clang
always adds an fpsr clobber, which means the same thing to LLVM, so we
can just use that.

This test case was broken by my LLVM change r196939.

Reviewers: echristo

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204878 91177308-0d34-0410-b5e6-96231b3b80d8
Don't produce a L symbol in __DATA,__data.

The section __DATA,__data is atomized by the linker and cannot have L symbols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204879 91177308-0d34-0410-b5e6-96231b3b80d8
PR19252: Fix crash if alignas is used with an auto-typed variable. Don't check
the type of the variable until it's known.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204887 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Just call getContextDescriptor to get the context for subprograms"
while I investigate as it seems to be causing issues with the gdb bot.

This reverts commit r204874.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204896 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Correctly identify ObjC Block with return type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204905 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Stop specifying size overrides for BumpPtrAllocators.

These don't seem to have any real point. Let's start with
IndexingContext. I can't come up with any conceivable reason to have
many hundereds of thousands of these alive in an address space which
would make the 4x difference in allocated (but unused) memory for the
string scratch buffer a significant memory usage problem.

The EditedSource one is somewhat more surprising. This is an 8x increase
in the memory allocated (but not used) per editted source file. However,
for this to realistically be a problem, you would need to have over half
a million editted source files in a single address space, and even that
would only really have problems on 32-bit Windows where you really only
have 2gb of virtual address space. And what's more important, the fix to
this if it is actually an issue shouldn't be to shrink the allocator's
size, it is to pass a single allocator into *many* edited source file
objects and let them share the memory.

These were the only two uses of custom sized BumpPtrAllocators
(excluding ones in the JIT using a custom allocation strategy) in all of
LLVM, Clang, LLD, LLDB, or Polly. I don't think we actually need this
complexity in the primary BumpPtrAllocator at all and am planning to
remove it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204910 91177308-0d34-0410-b5e6-96231b3b80d8
Fix bool expression special case.

Clang-format now correctly formats:
  some_type<a * b> v;
  template <bool a, bool b> typename enabled_if<a && b>::type f() {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204913 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Extract getNewLineColumn out of addTokenOnNewLine.

No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204930 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] OMPExecutableDirective re-factoring

Store the number of clauses and children of OMPExecutableDirective and dynamically compute the locations of corresponding arrays.

http://llvm-reviews.chandlerc.com/D2977



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204933 91177308-0d34-0410-b5e6-96231b3b80d8
Handle and warn on aliases to weak aliases.

This produces valid IR now that llvm rejects aliases to weak aliases and warns
the user that the resolution is not changed if the weak alias is overridden.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204935 91177308-0d34-0410-b5e6-96231b3b80d8
Comment parsing: when comment ranges are deserialized from multiple modules,
correctly order comments in SourceManager::isBeforeInTranslationUnit() order

Unfortunately, this is not as simple as it was implemented previously, and
actually requires doing a merge sort.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204936 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Avoid line-breaks that increase the current column.

While these might make sense for some rule (e.g. break after multi-line
operand), they generally appear ugly and confusing.

Before:
  fffffffffff(R\"x(
  multiline raw string literal xxxxxxxxxxxxxx
  )x\" + bbbbbb)

After:
  fffffffffff(R\"x(
  multiline raw string literal xxxxxxxxxxxxxx
  )x\" +
              bbbbbb)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204937 91177308-0d34-0410-b5e6-96231b3b80d8
Add a module cache path to the test that uses -fmodules


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204938 91177308-0d34-0410-b5e6-96231b3b80d8
InstrProf: Pull in runtime on non-Darwin

r204379 changed the way the profile runtime gets pulled in, but missed
updating non-Darwin targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204939 91177308-0d34-0410-b5e6-96231b3b80d8
Enforce the restriction that a parameter to a kernel function
cannot be a pointer to the private address space (as clarified
in the OpenCL 1.2 specification).

Patch by Fraser Cormack!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204941 91177308-0d34-0410-b5e6-96231b3b80d8
Comment parsing: attach comments to enums declared using the NS_ENUM macro

Previously we would only attach comments to the typedef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204942 91177308-0d34-0410-b5e6-96231b3b80d8
Comment parsing: use different comment styles in different test cases


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