It uses to initialize the class. If so, it returns uninitalized value.
This is UB and msan with -fno-inline will complain.
D == LastDecl);
}
- bool setUseQualifiedLookup(bool use = true) const {
- bool old_value = DeclContextBits.UseQualifiedLookup;
+ void setUseQualifiedLookup(bool use = true) const {
DeclContextBits.UseQualifiedLookup = use;
- return old_value;
}
bool shouldUseQualifiedLookup() const {
bool oldVal;
DeclContext *Context;
// Set flag in DeclContext informing debugger that we're looking for qualified name
- QualifiedLookupInScope(DeclContext *ctx) : Context(ctx) {
- oldVal = ctx->setUseQualifiedLookup();
+ QualifiedLookupInScope(DeclContext *ctx)
+ : oldVal(ctx->shouldUseQualifiedLookup()), Context(ctx) {
+ ctx->setUseQualifiedLookup();
}
~QualifiedLookupInScope() {
Context->setUseQualifiedLookup(oldVal);