Browse Source

Fixed another regression when parsing class templates.

Closes issue #411.
pull/413/head
triton 10 years ago
parent
commit
4ddbf34edb
  1. 4
      src/CppParser/Parser.cpp
  2. 11
      tests/CSharpTemp/CSharpTemp.h

4
src/CppParser/Parser.cpp

@ -985,7 +985,9 @@ ClassTemplate* Parser::WalkClassTemplate(clang::ClassTemplateDecl* TD) @@ -985,7 +985,9 @@ ClassTemplate* Parser::WalkClassTemplate(clang::ClassTemplateDecl* TD)
bool Process;
auto RC = GetRecord(TD->getTemplatedDecl(), Process);
CT->TemplatedDecl = RC;
WalkRecordCXX(TD->getTemplatedDecl(), RC);
if (Process)
WalkRecordCXX(TD->getTemplatedDecl(), RC);
CT->Parameters = WalkTemplateParameterList(TD->getTemplateParameters());

11
tests/CSharpTemp/CSharpTemp.h

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "../Tests.h"
#include <cstdint>
class DLL_API Foo
{
@ -392,5 +393,13 @@ public: @@ -392,5 +393,13 @@ public:
friend class QMap<Key, T>;
};
friend class const_iterator;
};
};
#define Q_PROCESSOR_WORDSIZE 8
template <int> struct QIntegerForSize;
template <> struct QIntegerForSize<1> { typedef uint8_t Unsigned; typedef int8_t Signed; };
template <> struct QIntegerForSize<2> { typedef uint16_t Unsigned; typedef int16_t Signed; };
template <> struct QIntegerForSize<4> { typedef uint32_t Unsigned; typedef int32_t Signed; };
template <> struct QIntegerForSize<8> { typedef uint64_t Unsigned; typedef int64_t Signed; };
typedef QIntegerForSize<Q_PROCESSOR_WORDSIZE>::Signed qregisterint;
typedef QIntegerForSize<Q_PROCESSOR_WORDSIZE>::Unsigned qregisteruint;

Loading…
Cancel
Save