diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-06-11 00:01:28 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-06-11 00:01:28 +0000 |
commit | 10ca24c631626b85d95e453a2dfc8661c52a8a5e (patch) | |
tree | 9e99f4da7c41a2446820cf9ea499906f5a29cfe6 /clang/lib/Analysis/UninitializedValues.cpp | |
parent | 2dace6e54bf977b255e49d70d7999da7ae4a5932 (diff) | |
download | bcm5719-llvm-10ca24c631626b85d95e453a2dfc8661c52a8a5e.tar.gz bcm5719-llvm-10ca24c631626b85d95e453a2dfc8661c52a8a5e.zip |
Allow lookup into dependent bases in more places under -fms-compatibility
We currently allow unqualified lookup for instance methods but not
static methods because we can't recover with a semantic 'this->'
insertion.
ATL headers have static methods that do unqualified lookup into
dependent base classes. The pattern looks like:
template <typename T> struct Foo : T {
static int *getBarFromT() { return Bar; }
};
Now we recover as if the user had written:
template <typename T> struct Foo : T {
static int *getBarFromT() { return Foo::Bar; }
};
... which will eventually look up Bar in T at instantiation time.
Now we emit a diagnostic in both cases, and delay lookup in other
contexts where 'this' is available and refers to a class with dependent
bases.
Reviewed by: rsmith
Differential Revision: http://reviews.llvm.org/D4079
llvm-svn: 210611
Diffstat (limited to 'clang/lib/Analysis/UninitializedValues.cpp')
0 files changed, 0 insertions, 0 deletions