eclipse / omr

Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes
http://www.eclipse.org/omr
Other
945 stars 396 forks source link

Fix extensible class linting errors on IA32 #1690

Open 0xdaryl opened 7 years ago

0xdaryl commented 7 years ago

On IA32 Linux, the following errors are reported by the linter tool. Note these errors are found when running this tool on 32-bit Linux, which is not part of the Travis CI validation.

The fix involves adding a downcast scope qualifier (to TR::TreeEvaluator::) when calling a static member function.

$ PLATFORM=amd64-linux-gcc make -f linter.mk -j20 ../../fvtest/compilertest/x/codegen/Evaluator.cpp.linted
 In file included from ../../fvtest/compilertest/x/codegen/Evaluator.cpp:19:
../../compiler/x/i386/codegen/OMRTreeEvaluator.cpp:103:4: error: Static member function must be called with scope qualifier. Suggested fix:
   compareGPRegisterToImmediate(node, cmpRegister->getHighOrder(), highValue, cg);
   ^
   TR::TreeEvaluator::
../../compiler/x/i386/codegen/OMRTreeEvaluator.cpp:107:4: error: Static member function must be called with scope qualifier. Suggested fix:
   compareGPRegisterToImmediate(node, cmpRegister->getLowOrder(), lowValue, cg);
   ^
   TR::TreeEvaluator::
../../compiler/x/i386/codegen/OMRTreeEvaluator.cpp:153:7: error: Static member function must be called with scope qualifier. Suggested fix:
      compareGPRegisterToImmediate(node, cmpRegister->getHighOrder(), highValue, cg);
      ^
      TR::TreeEvaluator::
../../compiler/x/i386/codegen/OMRTreeEvaluator.cpp:163:7: error: Static member function must be called with scope qualifier. Suggested fix:
      compareGPRegisterToImmediate(node, cmpRegister->getLowOrder(), lowValue, cg);
      ^
      TR::TreeEvaluator::
../../compiler/x/i386/codegen/OMRTreeEvaluator.cpp:222:7: error: Static member function must be called with scope qualifier. Suggested fix:
      compareGPRegisterToImmediate(node, cmpRegister->getHighOrder(), highValue, cg);
      ^
0xdaryl commented 7 years ago

Note that the line numbers are slightly off in the above output because the copyright header was changed in the meantime. The offending lines are easy to find though.