Fixing a compile error that recently started happening for me in MSVC 2013. CFGTerminator has an explicit conversion to bool operator that we can make use of instead of using == 0.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198175 91177308-0d34-0410-b5e6-96231b3b80d8
Use LLVM_EXPORTED_SYMBOL_FILE in libclang's cmake build.

Now the exports file should have an effect on non-darwin too.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198176 91177308-0d34-0410-b5e6-96231b3b80d8
[cmake] Set in LLVM_EXPORTED_SYMBOL_FILE PrintFunctionNames/CMakeLists.txt.

The corresponding Makefile sets it too. Also tweak add_clang_library to support
LLVM_EXPORTED_SYMBOL_FILE for modules.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198185 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo in comment.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198186 91177308-0d34-0410-b5e6-96231b3b80d8
Don't use PrintFunctionNames.exports on Windows.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198187 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup: Switch the preprocessor to err_pp_expected_after

This is approaching consistency but the PP and Parse categories they still have
slightly different wording:

def err_pp_expected_after : Error<"missing %1 after %0">;
def err_expected_after   : Error<"expected %1 after %0">;

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198189 91177308-0d34-0410-b5e6-96231b3b80d8
Fix and reword some typos

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198191 91177308-0d34-0410-b5e6-96231b3b80d8
For AArch64 Neon, simplify scalar dup by lane0 for fp.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198195 91177308-0d34-0410-b5e6-96231b3b80d8
Port r198088 (set NO_DEAD_STRIP for clang) from make to cmake.

Also stop setting passing -dead_strip explicitly for libclang and instead
rely on this now happening by default. (And make it happen by default for
add_clang_library, which doesn't use the library cmake functions from llvm.)


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198200 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake][VS][XCode] Restruct the output directory layout more comfortable, ${BINARY_DIR}/${BUILD_MODE}/(bin|lib)

We have been seeing nasty directory layout with CMake multiconfig, such as,
  bin/Release/clang.exe
  lib/clang/3.x/...
  lib/Release/clang/3.x/.. (duplicated)

Move the layout similar to autoconf's;
  Release/bin/clang.exe
  Release/lib/clang/3.x/...

Checked on Visual Studio 10. Could you guys please confirm my change on XCode(and other multiconfig builders)?

Note: Don't set variables CMAKE_*_OUTPUT_DIRECTORY any more, or a certain builder, for eaxample, msbuild.exe, would be confused.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198205 91177308-0d34-0410-b5e6-96231b3b80d8
Changed the test to avoid EXPECT_EQ(false, ...), which leads to
-Wconversion-null warning in GCC.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198214 91177308-0d34-0410-b5e6-96231b3b80d8
Update RecursiveASTVisitor so that it visits attributes.  This is currently
important for thread safety attributes, which contain expressions that were
not being visited, and were thus invisible to various tools.  There are now
Visit*Attr methods that can be overridden for every attribute.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198224 91177308-0d34-0410-b5e6-96231b3b80d8
Remove linkage macro from the CXLanguageKind enum

Enums don't have linkage, so clang warns when this expands to dllimport.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198227 91177308-0d34-0410-b5e6-96231b3b80d8
Fix two typos in comments. No functionality change.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198243 91177308-0d34-0410-b5e6-96231b3b80d8
Update DataRecursiveASTVisitor so that it visits attributes.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198249 91177308-0d34-0410-b5e6-96231b3b80d8
Switch over more of the parser to err_expected

Includes a fix for a missing highlight range caused by a ',' typo in the PP
diagnostics.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198252 91177308-0d34-0410-b5e6-96231b3b80d8
Silence g++ 4.9 build issue

lib/ASTMatchers/ASTMatchFinder.cpp:276:28: error: typedef 'traverse_can_only_be_instantiated_with_base_type' locally defined but not used [-Werror=unused-local-typedefs]
                            traverse_can_only_be_instantiated_with_base_type);

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198256 91177308-0d34-0410-b5e6-96231b3b80d8
Recover from errors in enum definition

Previously any error in enum definition body stopped parsing it. With this
change parser tries to recover from errors.
The patch fixes PR10982.

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


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198259 91177308-0d34-0410-b5e6-96231b3b80d8
[OpenCL] Produce an error, instead of a warning, for sizeof(void) in OpenCL.

Patch by joey.gouly@arm.com


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@198264 91177308-0d34-0410-b5e6-96231b3b80d8
ExpectAndConsume: Diagnose errors automatically

 1) Teach ExpectAndConsume() to emit expected and expected-after diagnostics
    using the generic diagnostic descriptions added in r197972, eliminating another
    set of trivial err_expected_* variations while maintaining existing behaviour.

 2) Lift SkipUntil() recovery out of ExpectAndConsume(). The Expect/Consume
    family of functions are primitive parser operations that now have the
    well-defined property of operating on single tokens. Factoring out recovery
    exposes opportunities for more consistent and tailored error recover at the
    call sites instead of just relying on a bottled SkipUntil formula.

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