https://github.com/cor3ntin commented:

I think It's going to be easier to review / maintain if you put all the  code 
inside the ` if (TypeSpecType != TST_error) ` in a (global static) function 
instead.

Maybe 

```cpp

void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
  // Before possibly changing their values, save specs as written.
  SaveWrittenBuiltinSpecs();

  // Check the type specifier components first. No checking for an invalid
  // type.
 CheckTypeSpecType(TypeSpecType, S, Policy);
 

in `CheckTypeSpecType` you can keep the early return.

My hope is that by doing so, the code should flow the same and have much fewert 
line changes. And limiting function size is never a bad thing anyway.


Thanks!


 



Try to keep the formatting changes to a minimum, this is a lot of code to review

https://github.com/llvm/llvm-project/pull/190597
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to