Rafael Espindola
980c053cb9
Don't special case one line extern "C" decls.
...
We already avoided warning for
extern "C" const char *Version_string = "2.9";
now we also don't produce any warnings for
extern "C" {
extern const char *Version_string2 = "2.9";
}
llvm-svn: 178333
2013-03-29 07:02:31 +00:00
Douglas Gregor
f7b98957ac
Push "out-of-line" declarations into scope when their lexical/semantic
...
redeclaration contexts are the same, as occurs within linkage
specifications. Fixes PR9162.
llvm-svn: 141521
2011-10-09 22:57:49 +00:00
Douglas Gregor
d4e1fb562e
Don't complain about a variable within a linkage-specification that is
...
initialized. Fixes PR7076.
llvm-svn: 116553
2010-10-15 01:21:46 +00:00
Douglas Gregor
117db7e95a
Parse all kinds of declarations as part of a linkage-specification,
...
from Francois Pichet! Fixes PR7754.
llvm-svn: 111912
2010-08-24 14:14:45 +00:00
Douglas Gregor
175ea046ee
A member function never has "C" linkage. Fixes <rdar://problem/8318976>.
...
llvm-svn: 111238
2010-08-17 16:09:23 +00:00
John McCall
8246e350be
Handle the obvious case for diagnosing redeclarations of extern "C" functions.
...
Fixes PR7859.
llvm-svn: 110906
2010-08-12 07:09:11 +00:00
Abramo Bagnara
ed5b6899ab
Fixed typedef inside extern "C".
...
llvm-svn: 109865
2010-07-30 16:47:02 +00:00
Daniel Dunbar
8fbe78f6fc
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
...
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Douglas Gregor
a64c1e5452
When performing unqualified name lookup in C++, don't look directly
...
into transparent contexts; instead, we'll look into their nearest
enclosing non-transparent contexts further up the stack. Fixes PR5479.
llvm-svn: 90859
2009-12-08 15:38:36 +00:00
Sebastian Redl
afb8be743d
When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430.
...
llvm-svn: 86461
2009-11-08 11:36:54 +00:00
Daniel Dunbar
8b57697954
Eliminate &&s in tests.
...
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Douglas Gregor
f2270430a1
Skip transparent contexts when performing C++ name lookup
...
llvm-svn: 79931
2009-08-24 18:55:03 +00:00
Anders Carlsson
7bf3c4227d
Fix another case where the extern-ness of extern "C" wasn't being captured.
...
This makes me think that we should make hasExternalStorage perform this check...
llvm-svn: 71962
2009-05-16 22:05:23 +00:00
Daniel Dunbar
a45cf5b6b0
Rename clang to clang-cc.
...
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Douglas Gregor
8d973111a8
When determining whether a variable is a file-scoped variable, check
...
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.
llvm-svn: 61848
2009-01-07 02:48:43 +00:00
Douglas Gregor
3bdc895818
Add forgotten test case for linkage specifications
...
llvm-svn: 61737
2009-01-05 19:50:09 +00:00