Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-1504

Sema: fix IllegalStateException "Several good alternatives"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.11
    • Fix Version/s: 3.12
    • Component/s: C++, Semantic Analysis
    • Labels:
      None

      Description

      Reduced test case from https://github.com/google/protobuf/blob/2131b2d544bf6eeb789c128ef3e9e04fc299237a/src/google/protobuf/arena_unittest.cc#L1062 :

      struct C {
        template< typename T >
        static T* Create(int p) {
          return 0;
        }
      };
      
      template<typename>
      struct A {
      };
      
      struct B {
      };
      
      void test(int p) {
        C::Create < A<B> >( p );
      }
      

      Note that essentially this is the same case as without qualified name, but last one works because of ExpressionVisitor.visitTemplateId.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              evgeny.mandrikov Evgeny Mandrikov
              Reporter:
              evgeny.mandrikov Evgeny Mandrikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: