File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3116,11 +3116,12 @@ class FieldDecl : public DeclaratorDecl, public Mergeable<FieldDecl> {
31163116 // / Returns the index of this field within its record,
31173117 // / as appropriate for passing to ASTRecordLayout::getFieldOffset.
31183118 unsigned getFieldIndex () const {
3119- const FieldDecl *C = getCanonicalDecl ();
3120- if (C->CachedFieldIndex == 0 )
3121- C->setCachedFieldIndex ();
3122- assert (C->CachedFieldIndex );
3123- return C->CachedFieldIndex - 1 ;
3119+ const FieldDecl *Canonical = getCanonicalDecl ();
3120+ if (Canonical->CachedFieldIndex == 0 ) {
3121+ Canonical->setCachedFieldIndex ();
3122+ assert (Canonical->CachedFieldIndex != 0 );
3123+ }
3124+ return Canonical->CachedFieldIndex - 1 ;
31243125 }
31253126
31263127private:
You can’t perform that action at this time.
0 commit comments