mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-15 02:16:40 +00:00

In some cases, when deserializing a `CXXMethodDecl` of a `CXXSpecializationTemplateDecl`, the call to `FunctionDecl::setPure()` happens before the `DefinitionData` member has been populated (which appears to happen lower down in a `mergeRedeclarable` call), causing a crash (https://reviews.llvm.org/P8228). This diff fixes this by deferring the `FunctionDecl::setPure()` till after the `DefinitionData` has been filled in. Reviewed By: lxfind Differential Revision: https://reviews.llvm.org/D86853
10 lines
253 B
C++
10 lines
253 B
C++
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ -I %S/Inputs/set-pure-crash -verify %s -o %t
|
|
|
|
// expected-no-diagnostics
|
|
|
|
#include "b.h"
|
|
#include "c.h"
|
|
|
|
auto t = simple<const char *>();
|