Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"This decl is not contained in a translation unit!" assertion failure using PCH #8506

Closed
llvmbot opened this issue Sep 13, 2010 · 1 comment
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 13, 2010

Bugzilla Link 8134
Resolution FIXED
Resolved on Sep 13, 2010 06:49
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @akyrtzi,@tkremenek

Extended Description

If I have pre.hpp containing:

template void f(T);
template void f(T);
void g() { f(0); f('x'); }

Then if I do:

clang -cc1 pre.hpp -emit-pch -o pre.hpp.pch
echo | clang -cc1 -include-pch pre.hpp.pch -x c++ -

The second invocation results in:

clang: DeclBase.cpp:199: clang::TranslationUnitDecl*
clang::Decl::getTranslationUnitDecl(): Assertion
`DC && "This decl is not contained in a translation unit!"' failed.

I'm using Clang r113729.

@akyrtzi
Copy link
Contributor

akyrtzi commented Sep 13, 2010

Fixed at r113744, thanks for the report!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants