<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -fdelayed-template-parsing with -fms-extensions creates a bad AST"
href="http://llvm.org/bugs/show_bug.cgi?id=17040">17040</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-fdelayed-template-parsing with -fms-extensions creates a bad AST
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.majnemer@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>consider:
struct Type {
template <int i>
static void Foo() {}
template <>
void Foo<0>() {}
};
void call() { Type::Foo<0>(); }
run:
clang -cc1 /var/tmp/stranger.cpp -fdelayed-template-parsing -fms-extensions
-ast-dump
The AST looks like:
TranslationUnitDecl 0x5717a90 <<invalid sloc>>
|-TypedefDecl 0x5717fd0 <<invalid sloc>> __int128_t '__int128'
|-TypedefDecl 0x5718030 <<invalid sloc>> __uint128_t 'unsigned __int128'
|-TypedefDecl 0x57183f0 <<invalid sloc>> __builtin_va_list '__va_list_tag [1]'
|-CXXRecordDecl 0x5718440 <<built-in>:28:1, col:7> class type_info
|-CXXRecordDecl 0x57184f0 </var/tmp/stranger.cpp:1:1, line:6:1> struct Type
| |-CXXRecordDecl 0x5718600 <line:1:1, col:8> struct Type
| |-FunctionTemplateDecl 0x574b3f0 <line:2:3, line:3:19> Foo
| | |-NonTypeTemplateParmDecl 0x57186a0 <line:2:13, col:17> 'int' i
| | |-CXXMethodDecl 0x574b350 <line:3:3, col:19> Foo 'void (void)' static
| | | `-<<<NULL>>>
| | `-CXXMethod 0x574b490 'Foo' 'void (void)'
| `-CXXMethodDecl 0x574b490 prev 0x574b640 <line:4:3, line:5:15> Foo 'void
(void)'
| |-TemplateArgument integral 0
| `-<<<NULL>>>
`-FunctionDecl 0x574b7e0 <line:8:1, col:31> call 'void (void)'
`-CompoundStmt 0x574bb08 <col:13, col:31>
`-CallExpr 0x574bae0 <col:15, col:28> 'void'
`-ImplicitCastExpr 0x574bac8 <col:15, col:26> 'void (*)(void)'
<FunctionToPointerDecay>
`-DeclRefExpr 0x574ba10 <col:15, col:26> 'void (void)' lvalue CXXMethod
0x574b490 'Foo' 'void (void)' (FunctionTemplate 0x574b3f0 'Foo')</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>