This code works around what appears to be a bug in another part of clang.
I have filed http://llvm.org/bugs/show_bug.cgi?id=15538 against clang.
This code is safer anyway because "cast" assumes you really know that
it's okay to make the cast. In this case isa should not be false and
dyn_cast should not return null as far as I understand. But everything
else is valid so I did not want to revert my previous patch for attributes
mips16/nomips16 or use an llvm_unreachable here which would make a number
of our tests fail for mips.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177329 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH] Fix assertion hit related to enum decls inside templated funtions.

Report and suggested fix by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=13020

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177330 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177335 91177308-0d34-0410-b5e6-96231b3b80d8
[frontend] Initialize the diagnostic client before loading an ast file.

Issue reported by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=15377

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