History log of /external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
1b7f9cbed1b96b58a6e5f7808ebc9345a76a0936 13-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR10447: lazily building name lookup tables for DeclContexts was broken.
The deferred lookup table building step couldn't accurately tell which Decls
should be included in the lookup table, and consequently built different tables
in some cases.

Fix this by removing lazy building of DeclContext name lookup tables. In
practice, the laziness was frequently not worthwhile in C++, because we
performed lookup into most DeclContexts. In C, it had a bit more value,
since there is no qualified lookup.

In the place of lazy lookup table building, we simply don't build lookup tables
for function DeclContexts at all. Such name lookup tables are not useful, since
they don't capture the scoping information required to correctly perform name
lookup in a function scope.

The resulting performance delta is within the noise on my testing, but appears
to be a very slight win for C++ and a very slight loss for C. The C performance
can probably be recovered (if it is a measurable problem) by avoiding building
the lookup table for the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
7984de35644701c0d94336da7f2215d4c26d9f5b 13-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:

- If the declarator is at the start of a line, and the previous line contained
another declarator and ended with a comma, then that comma was probably a
typo for a semicolon:

int n = 0, m = 1, l = 2, // k = 5;
myImportantFunctionCall(); // oops!

- If removing the parentheses would correctly initialize the object, then
produce a note suggesting that fix.

- Otherwise, if there is a simple initializer we can suggest which performs
value-initialization, then provide a note suggesting a correction to that
initializer.

Sema::Declarator now tracks the location of the comma prior to the declarator in
the declaration, if there is one, to facilitate providing the note. The code to
determine an appropriate initializer from the -Wuninitialized warning has been
factored out to allow use in both that and -Wvexing-parse.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
2f0e88a87cea6d21429d9f5c0b1c53f24caf77cf 06-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> David Blaikie and Chandler would like us to diagnose

int f();

in function scopes under -Wvexing-parse, so now we do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
1d7bcf4b35f8bc0a0a40f4ea7b06b55c63725108 06-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Tweak to r147599 for PR10828: Move the check from the parser into sema, and use
the Semantic Powers to only warn on class types (or dependent types), where the
constructor or destructor could do something interesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
cb7709c06027448c754dd03e2e521d82d04818bf 05-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR10828: Produce a warning when a no-arguments function is declared in block
scope, when no other indication is provided that the user intended to declare a
function rather than a variable.

Remove some false positives from the existing 'parentheses disambiguated as a
function' warning by suppressing it when the declaration is marked as 'typedef'
or 'extern'.

Add a new warning group -Wvexing-parse containing both of these warnings.

The new warning is enabled by default; despite a number of false positives (and
one bug) in clang's test-suite, I have only found genuine bugs with it when
running it over a significant quantity of real C++ code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
35dfab9cb14b7d368e4922dce786a5e046a61420 10-Dec-2009 John McCall <rjmccall@apple.com> Actually try to trigger the last diagnostic in the declaration-collision test case.
Surprisingly, we *do* diagnose one of them. Since we don't really track scopes into
instantiation, this has to signal some kind of bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
41ce66f8e20159d8bd39fff54ae01608da06c294 10-Dec-2009 John McCall <rjmccall@apple.com> Improve the diagnostic when a new declaration conflicts with a using shadow
declaration. Rename note_using_decl to note_using, which is possibly less confusing.
Add a test for non-class-scope using decl collisions and be sure to note the case
we can't diagnose yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp