PR18581: Attempt to complete the type in a VLA declaration before checking
whether it's POD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201018 91177308-0d34-0410-b5e6-96231b3b80d8
Move the -fms-compatibility using decl check after real access checking

Summary:
This avoids false positives from -Wmicrosoft when name lookup would
normally succeed in standard C++.  This triggered on a common CRTP
pattern in clang, where a derived class would have a private using decl
to pull in members of a dependent base:

class Verifier : InstVisitor<Verifier> {
private:
  using InstVisitor<Verifier>::visit;
  ...
  void anything() {
    visit(); // warned here
  }
};

Real access checks pass here because we're in the context of the
Verifier, but the -Wmicrosoft extension was just looking for the private
access specifier.

Reviewers: rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201019 91177308-0d34-0410-b5e6-96231b3b80d8
type_info objects are not unnamed_addr: the ABI requires us to
unique them and permits the implementation of dynamic_cast (and
anything else which knows it's working with a complete class
type) to compare their addresses directly.

rdar://16005328

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201020 91177308-0d34-0410-b5e6-96231b3b80d8
PR16519, PR18009: When checking a partial specialization for uses of its own
template parameters, don't look for parameters of outer templates. If a problem
is found in a default template argument, point the diagnostic at the partial
specialization (with a note pointing at the default argument) instead of
pointing it at the default argument and leaving it unclear which partial
specialization os problematic.


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

TargetInfo::getSuitableAlign() was introduced in r146762 and is defined
as alignof(std::max_align_t).

Introduce __ALIGNOF_MAX_ALIGN_T__ which exposes getSuitableAlign() so
that libc++ may take advantage of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201037 91177308-0d34-0410-b5e6-96231b3b80d8
Improve diagnostic for using non-class/namespace/scoped enum in a nested name specifier.

Rather than simply saying "X is not a class or namespace", clarify what
X is by providing the aka type in the case where X is a type, or
pointing to the named declaration if there's an unambiguous one to refer
to. In the ambiguous case, the ambiguities are already enumerated
(though could be clarified by describing what kind of entities they are)

Included a few FIXMEs in tests where some further improvements could be
made.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201038 91177308-0d34-0410-b5e6-96231b3b80d8
Clarify comment. Remove braces from single-statement block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201040 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] While visiting a C++ destructor decl, keep the type identifier associated with the decl,
don't turn it into a type ref.

rdar://15907618

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201042 91177308-0d34-0410-b5e6-96231b3b80d8
PR18685: Ignore class template specializations as potential
nested-name-specifiers for typos unless the typo already has
a nested-name-specifier that is a template specialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201056 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] add_clang_library(): Use llvm_add_library.

CMAKE_MODULE_LINKER_FLAGS can be removed since llvm_add_library(MODULE) adds same flags to MODULE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201073 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Clang install rules to not set permissions on include/

The CMake install(DIRECTORY) command documents that it sets permissions
on directories it is asked to install.  Since the <prefix>/include
directory may not be exclusive to the LLVM/Clang installation, we should
not ask CMake to manage permissions of that directory for us.  Instead,
give only our own include/clang and include/clang-c subdirectories to
the install(DIRECTORY) command.

Fixes PR4500. Patch by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201076 91177308-0d34-0410-b5e6-96231b3b80d8
ASTUnit: simplify remapping files by using the exact same logic in Preprocessor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201082 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: implement vshrn NEON intrinsic in terms of shr/trunc

Now the backend supports the natural LLVM IR, we can shamelessly steal the
AArch64 front-end code to implement the vshrn intrinsic on 32-bit ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201086 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: move vshll NEON implementation to common code

Now that both ARM backends use the same implementation for vshll operations,
the code can be shared. This is also a necessary LLVM/Clang interface update.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201094 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Remove useless MSStructPragmaOn update in Sema::~Sema

No functional change, this code was just superfluous.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201099 91177308-0d34-0410-b5e6-96231b3b80d8
PR18777: This PR is already fixed; add regtest.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201100 91177308-0d34-0410-b5e6-96231b3b80d8
Basic: Clean up malformed pragma diagnostics

Create a new diagnostic, -Wignored-pragmas and use it to handle any
case where a pragma would have a side effect but is ignored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201102 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Add support for #pragma pointers_to_members

Introduce a notion of a 'current representation method' for
pointers-to-members.

When starting out, this is set to 'best case' (representation method is
chosen by examining the class, selecting the smallest representation
that would work given the class definition or lack thereof).

This pragma allows the translation unit to dictate exactly what
representation to use, similar to how the inheritance model keywords
operate.

N.B.  PCH support is forthcoming.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201105 91177308-0d34-0410-b5e6-96231b3b80d8
Tests for DR351-370, plus update DR status page to match the latest core issue list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201106 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Fixed vget/vset_lane_f16 implementation

Replaced cast and vreinterepret operations with
code to reinterpret bitwise the types float16_t and
int16_t.



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