Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor de80ec1fa9 Improve diagnostics for the "type qualifier on return type has no
effect warning" by printing the qualifiers we saw and correctly
pluralizing the message, e.g.,

test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type
      qualifiers on return type have no effect
  const volatile Enum g2() {
  ^~~~~ ~~~~~~~~





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108236 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13 08:50:30 +00:00
Douglas Gregor 5291c3cec0 When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types. 

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13 08:18:22 +00:00
Douglas Gregor e1aa9f3a5d When referring to a tag that was previously declared only as a friend,
build a new declaration for that tag type that will be visible for
future lookups of that tag.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08 21:27:36 +00:00
John McCall bc12044215 Test case for PR5134.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 01:09:14 +00:00
John McCall df37000221 Test case from PR5476.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:44:38 +00:00
John McCall e129d44aab Patch over yet more problems with friend declarations which were provoking
problems on LLVM-Code-Syntax.  This proved remarkably easy to "fix" once
I settled on how I was going to approach it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-17 23:21:11 +00:00
Daniel Dunbar a5728872c7 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
2009-12-15 20:14:24 +00:00
John McCall e7e278bce2 Don't enter a new scope for a namespace-qualified declarator unless we're
in a file context.  In well-formed code, only happens with friend functions.
Fixes PR 5760.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 20:04:54 +00:00
Anders Carlsson 0033836b3c Friend declarations are only valid inside class definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-11 22:55:49 +00:00