diff options
author | joost <joost@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-05-31 17:31:28 +0000 |
---|---|---|
committer | joost <joost@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-05-31 17:31:28 +0000 |
commit | 01c0d1a46d49fab62e5e985a367e1fac5fa454db (patch) | |
tree | 14f599902a96f25ccc1831bcf79dcb824dbffbff | |
parent | 2714f5858c0824d9908b0bbc9aee00e47bd57b3b (diff) | |
download | fpc-01c0d1a46d49fab62e5e985a367e1fac5fa454db.tar.gz |
* Do not show a false warning about the result of a TCustomAttribute
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/joost@24671 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | classattributes/compiler/symtable.pas | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/classattributes/compiler/symtable.pas b/classattributes/compiler/symtable.pas index 627c01ddc8..e9d98d0fda 100644 --- a/classattributes/compiler/symtable.pas +++ b/classattributes/compiler/symtable.pas @@ -673,9 +673,11 @@ implementation if (vo_is_funcret in tabstractvarsym(sym).varoptions) then begin { don't warn about the result of constructors } + { or the synthetic helper functions for class-attributes } if ((tsym(sym).owner.symtabletype<>localsymtable) or (tprocdef(tsym(sym).owner.defowner).proctypeoption<>potype_constructor)) and - not(cs_opt_nodedfa in current_settings.optimizerswitches) then + not(cs_opt_nodedfa in current_settings.optimizerswitches) and + (tprocdef(tsym(sym).owner.defowner).synthetickind <> tsk_get_rttiattribute) then MessagePos(tsym(sym).fileinfo,sym_w_function_result_not_set) end else if (tsym(sym).owner.symtabletype=parasymtable) then |