clang/test/Index/index-pch-with-module.m: Tweak expressions for win32 pathsep.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165760 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Index/index-module.m: Mark it as XFAIL:win32 for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165761 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Index/index-module.m: Move XFAIL. It was line-number-sensitive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165762 91177308-0d34-0410-b5e6-96231b3b80d8
Provide a fixit when taking the address of an unqualified member function.

This only applies if the type has a name. (we could potentially do something
crazy with decltype in C++11 to qualify members of unnamed types but that
seems excessive)

It might be nice to also suggest a fixit for "&this->i", "&foo->i",
and "&foo.i" but those expressions produce 'bound' member functions that have
a different AST representation & make error recovery a little trickier. Left
as future work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165763 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing classof().

Somewhat troublingly, without this implemented, the check inside
isa_impl<> would silently use the parent's `classof()` when determining
whether it was okay to downcast from the parent to the child!

Bug analysis:

A build failure after removing the parent's `classof()` initially
alerted me to the bug, after which a little bit of thinking and reading
of the code identified the root cause.

The compiler could be made to prevent this bug from happening if there
were a way to ensure that in the code

    template <typename To, typename From, typename Enabler = void>
    struct isa_impl {
      static inline bool doit(const From &Val) {
        return To::classof(&Val);
      }
    };

that `To::classof` is actually inside the class `To`, and not in a base
class. I am not aware of a way to check this in C++. If there is a means
to perform that check, please bring it up on the list and this will be
fixed.

There is a high likelihood that there are other instances of this same
bug in the codebase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165769 91177308-0d34-0410-b5e6-96231b3b80d8
Remove pointless classof()'s.

Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
search for overridden methods with comment when overriding method
has none of its own. Factor in Doug's comments.
// rdar://12378793


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165771 91177308-0d34-0410-b5e6-96231b3b80d8
Remove dead code introduced in r165751.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165772 91177308-0d34-0410-b5e6-96231b3b80d8
Track which particular submodule #undef's a macro, so that the actual
#undef only occurs if that submodule is imported.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165773 91177308-0d34-0410-b5e6-96231b3b80d8
Conditionally use an integral cast for BodyFarm support for OSAtomicCompareAndSwap if the return type is not a boolean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165774 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH] We only need to record C++ overridden methods once for the canonical decl.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165793 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Index/index-module.m: Tweak expressions to fit Win32 paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165794 91177308-0d34-0410-b5e6-96231b3b80d8
c-index-test.c: /* Use C style comment. */

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165797 91177308-0d34-0410-b5e6-96231b3b80d8
Add dump support for comments coming from
overridden symbols. OK'ed off-line by Doug. 
// rdar://12378793


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165807 91177308-0d34-0410-b5e6-96231b3b80d8
Handle a "#pragma options align" inside a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165810 91177308-0d34-0410-b5e6-96231b3b80d8
Change (!ptr != 0) to (!ptr) to make the code more readable.
No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165811 91177308-0d34-0410-b5e6-96231b3b80d8
Have scan-view guard against serving up pages outside the root directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165815 91177308-0d34-0410-b5e6-96231b3b80d8
This patch addresses PR13948.

For 64-bit PowerPC SVR4, an aggregate containing only one
floating-point field (float, double, or long double) must be passed in
a register as though just that field were present.  This patch
addresses the issue during Clang code generation by specifying in the
ABIArgInfo for the argument that the underlying type is passed
directly in a register.  The included test case verifies flat and
nested structs for the three data types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165816 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo correction of one qualified name to another.

When suggesting "foo::bar" as a correction for "fob::bar" we mistakenly
replaced only "bar" with "foo::bar" producing "fob::foo::bar" which was broken.

This corrects that replacement in as many places as I could find & provides
test cases for all those cases I could find a test case for. There are a couple
that don't seem to be reachable (one looks entirely dead, the other just
doesn't seem to ever get called with a namespace to namespace change).

Review by Richard Smith ( http://llvm-reviews.chandlerc.com/D57 ).

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